Commit db77d02e authored by Eric Dumazet's avatar Eric Dumazet Committed by Matthias Männich
Browse files

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: default avatarEric Dumazet <edumazet@google.com>
Reviewed-by: default avatarJiri Pirko <jiri@nvidia.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
(cherry picked from commit b5590270)
Bug: 339546075
Bug: 343361790
Change-Id: I29a711ea804794b556674011cbd23c5bf9a03ab6
Signed-off-by: default avataryenchia.chen <yenchia.chen@mediatek.com>
Signed-off-by: default avatarCarlos Llamas <cmllamas@google.com>
(cherry picked from commit 58719dc9)
parent 4da9a730
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment