diff options
| author | Eric Dumazet <edumazet@google.com> | 2017-02-14 09:03:51 -0800 |
|---|---|---|
| committer | Michael Bestas <mkbestas@lineageos.org> | 2017-05-14 13:05:07 +0300 |
| commit | b56a7c1839946aaa14e33e35886f77b937ca9182 (patch) | |
| tree | 3fa0185fdb5a652b250a2ca70adcc29f6c54f1df /net/lapb/lapb_subr.c | |
| parent | 7860d54a5b897c6529db5fc95f8336ca1e4d2ffc (diff) | |
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.
[js] no rollover in 3.12
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: Jiri Slaby <jslaby@suse.cz>
Diffstat (limited to 'net/lapb/lapb_subr.c')
0 files changed, 0 insertions, 0 deletions
