diff options
author | Eric Dumazet <edumazet@google.com> | 2017-02-14 09:03:51 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-02-26 11:10:50 +0100 |
commit | 722737f27774b14be5a1d2d3b9281dcded7c48b2 (patch) | |
tree | 6054f6623afb84b33b112ecea852e2dc0f375458 /Documentation/memory-devices | |
parent | e0cb28247882a90f60b219f335c00d8d578cbe66 (diff) | |
download | linux-stable-722737f27774b14be5a1d2d3b9281dcded7c48b2.tar.gz linux-stable-722737f27774b14be5a1d2d3b9281dcded7c48b2.tar.bz2 linux-stable-722737f27774b14be5a1d2d3b9281dcded7c48b2.zip |
packet: fix races in fanout_add()
[ Upstream commit d199fab63c11998a602205f7ee7ff7c05c97164b ]
Multiple threads can call fanout_add() at the same time.
We need to grab fanout_mutex earlier to avoid races that could
lead to one thread freeing po->rollover that was set by another thread.
Do the same in fanout_release(), for peace of mind, and to help us
finding lockdep issues earlier.
Fixes: dc99f600698d ("packet: Add fanout support.")
Fixes: 0648ab70afe6 ("packet: rollover prepare: per-socket state")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'Documentation/memory-devices')
0 files changed, 0 insertions, 0 deletions