]> git.kernelconcepts.de Git - karo-tx-linux.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 21 Oct 2012 16:27:59 +0000 (09:27 -0700)
commit486aaeb0b972820ed704bdf416270ec4b0950da3
treea7bd741818d81ec8b85c273c009225f40170945a
parentc8479435f2191c22871a4b27e7eb2d501f4661e8
ipvs: fix oops in ip_vs_dst_event on rmmod

commit 283283c4da91adc44b03519f434ee1e7e91d6fdb upstream.

After commit 39f618b4fd95ae243d940ec64c961009c74e3333 (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>
Acked-by: David Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/netfilter/ipvs/ip_vs_ctl.c