]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drop_monitor: Make updating data->skb smp safe
authorNeil Horman <nhorman@tuxdriver.com>
Fri, 27 Apr 2012 10:11:49 +0000 (10:11 +0000)
committerPaul Gortmaker <paul.gortmaker@windriver.com>
Mon, 10 Feb 2014 21:10:58 +0000 (16:10 -0500)
commitae41105eb938740268be8a6fc355aa74090780b5
tree5a5eccf2db5fb7380b8427dfd9a75a1f24027fc6
parentb350f3ad5b483c943c3f0fa5ac62e530ea3dbc01
drop_monitor: Make updating data->skb smp safe

commit 3885ca785a3618593226687ced84f3f336dc3860 upstream.

Eric Dumazet pointed out to me that the drop_monitor protocol has some holes in
its smp protections.  Specifically, its possible to replace data->skb while its
being written.  This patch corrects that by making data->skb an rcu protected
variable.  That will prevent it from being overwritten while a tracepoint is
modifying it.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Reported-by: Eric Dumazet <eric.dumazet@gmail.com>
CC: David Miller <davem@davemloft.net>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[PG: The "__rcu" sparse addition is only present in 2.6.37+ kernels.]
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
net/core/drop_monitor.c