]> git.baikalelectronics.ru Git - kernel.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)
committerDavid S. Miller <davem@davemloft.net>
Sat, 28 Apr 2012 06:18:48 +0000 (02:18 -0400)
commit2c72acf916ab2d9a57a6ccc981fd6b430d9112eb
treea6b5af980c1295aaeee69749d4d79d47e072321a
parentc0bf2877ccb4e85cf7e8c6b1c36238559d3de175
drop_monitor: Make updating data->skb smp safe

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>
net/core/drop_monitor.c