]> git.baikalelectronics.ru Git - kernel.git/commit
net: vrf: protect changes to private data with rcu
authorDavid Ahern <dsa@cumulusnetworks.com>
Fri, 13 May 2016 19:23:45 +0000 (12:23 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 16 May 2016 17:46:24 +0000 (13:46 -0400)
commit6c86ecfb465f327c8f761d515526ca2b38284193
tree239ed2164ac2f56234694509070020a1dcce98a9
parent6a1c8508ecc0b8cbacccead4e2e61c5d873f94a0
net: vrf: protect changes to private data with rcu

One cpu can be processing packets which includes using the cached route
entries in the vrf device's private data and on another cpu the device
gets deleted which releases the routes and sets the pointers in net_vrf
to NULL. This results in datapath dereferencing a NULL pointer.

Fix by protecting access to dst's with rcu.

Fixes: 9c5f942f99b3 ("net: Introduce VRF device driver")
Fixes: d338be79af90 ("net: Add IPv6 support to VRF device")
Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/vrf.c