]> git.baikalelectronics.ru Git - kernel.git/commit
ipvs: fix oops in ip_vs_dst_event on rmmod
authorJulian Anastasov <ja@ssi.bg>
Sat, 7 Jul 2012 17:30:11 +0000 (20:30 +0300)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 17 Jul 2012 10:00:58 +0000 (12:00 +0200)
commit9eb69b4f11bf7d146a0a83abea7623b87e25ac24
treee37e991a30b63ff5fd7e2363bd361a93db545e5b
parent073276fe007658f3b481f5b7dd0a8f011b920fce
ipvs: fix oops in ip_vs_dst_event on rmmod

After commit 0126bf1ca35373dd3e92c48f56b58f3122cb6046 (3.4)
"ipvs: reset ipvs pointer in netns" we can oops in
ip_vs_dst_event on rmmod ip_vs because ip_vs_control_cleanup
is called after the ipvs_core_ops subsys is unregistered and
net->ipvs is NULL. Fix it by exiting early from ip_vs_dst_event
if ipvs is NULL. It is safe because all services and dests
for the net are already freed.

Signed-off-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/ipvs/ip_vs_ctl.c