diff options
| author | Eric Dumazet <edumazet@google.com> | 2017-02-14 09:03:51 -0800 |
|---|---|---|
| committer | Moyster <oysterized@gmail.com> | 2017-05-20 19:00:37 +0200 |
| commit | 2fb6ab951ff946a879d9128a81b9b960ffe511bd (patch) | |
| tree | ca939a14eaa7109bb6858be56596ae84488c5f90 /kernel/trace | |
| parent | e81aa7c21c7b9f30998519db6d63056b42544867 (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")
Change-Id: I0418252031431ab0f17c5a33073257d2c3106144
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 'kernel/trace')
0 files changed, 0 insertions, 0 deletions
