]> xenbits.xensource.com Git - legacy/linux-2.6.18-xen.git/commit
netfront: Unregister inetdev notifiers on failure
authorKeir Fraser <keir.fraser@citrix.com>
Mon, 2 Mar 2009 11:06:52 +0000 (11:06 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Mon, 2 Mar 2009 11:06:52 +0000 (11:06 +0000)
commitbbbf88b11972defbb39b99488bfc53d85dbf2c46
tree70c38b2e8b879d50be3c47d5960ddf1808fe6974
parentc0948671170448cb54ce37b58260fab9fb4ac916
netfront: Unregister inetdev notifiers on failure
If you attempt to modprobe the pv-on-hvm netfront driver on a machine
not running under Xen (say, bare-metal, or under another hypervisor), the
netfront code correctly returns an ENODEV and fails to load.  However, if you
then shutdown that machine, you will oops while tearing down the network.
This is because we forget to unregister the the inetaddr_notifier on failure,
and so the kernel takes a fatal page fault.  The attached patch just unregisters
the notifier on failure, and solves the problem for me.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
drivers/xen/netfront/netfront.c