UPSTREAM: netlink: hold nlk->cb_mutex longer in __netlink_dump_start()
__netlink_dump_start() releases nlk->cb_mutex right before calling netlink_dump() which grabs it again. This seems dangerous, even if KASAN did not bother yet. Add a @lock_taken parameter to netlink_dump() to let it grab the mutex if called from netlink_recvmsg() only. Signed-off-by:Eric Dumazet <edumazet@google.com> Reviewed-by:
Jiri Pirko <jiri@nvidia.com> Signed-off-by:
David S. Miller <davem@davemloft.net> (cherry picked from commit b5590270) Bug: 339546075 Bug: 343361790 Change-Id: I29a711ea804794b556674011cbd23c5bf9a03ab6 Signed-off-by:
yenchia.chen <yenchia.chen@mediatek.com> Signed-off-by:
Carlos Llamas <cmllamas@google.com> (cherry picked from commit 58719dc9)
Loading
Please sign in to comment