linux/net
Pavel Emelyanov c67625a1ec [NET]: Remove notifier block from chain when register_netdevice_notifier fails
Commit fcc5a03ac42564e9e255c1134dda47442289e466:

	[NET]: Allow netdev REGISTER/CHANGENAME events to fail

makes the register_netdevice_notifier() handle the error from the
NETDEV_REGISTER event, sent to the registering block.

The bad news is that in this case the notifier block is 
not removed from the list, but the error is returned to the 
caller. In case the caller is in module init function and 
handles this error this can abort the module loading. The
notifier block will be then removed from the kernel, but 
will be left in the list. Oops :(

I think that the notifier block should be removed from the
chain in case of error, regardless whether this error is 
handled by the caller or not. In the worst case (the error 
is _not_ handled) module will not receive the events any 
longer.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-11-14 15:53:16 -08:00
..
9p
802
8021q
appletalk
atm
ax25
bluetooth
bridge [NETFILTER]: bridge: fix double POSTROUTING hook invocation 2007-11-13 02:58:44 -08:00
core [NET]: Remove notifier block from chain when register_netdevice_notifier fails 2007-11-14 15:53:16 -08:00
dccp
decnet [INET]: Small possible memory leak in FIB rules 2007-11-10 22:12:03 -08:00
econet
ethernet
ieee80211
ipv4 [TCP]: Make sure write_queue_from does not begin with NULL ptr 2007-11-14 15:47:18 -08:00
ipv6 [IPV6]: Add ifindex field to ND user option messages. 2007-11-12 17:58:35 -08:00
ipx
irda
iucv
key
lapb
llc
mac80211 mac80211: fix MAC80211_RCSIMPLE Kconfig 2007-11-10 22:01:42 -08:00
netfilter [NETFILTER]: xt_time should not assume CONFIG_KTIME_SCALAR 2007-11-13 03:49:53 -08:00
netlabel
netlink [NET]: Move unneeded data to initdata section. 2007-11-13 03:23:50 -08:00
netrom
packet [AF_PACKET]: Fix minor code duplication 2007-11-12 21:05:20 -08:00
rfkill
rose
rxrpc [NET]: Add the helper kernel_sock_shutdown() 2007-11-12 18:10:39 -08:00
sched [PKT_SCHED]: Check subqueue status before calling hard_start_xmit 2007-11-13 20:40:55 -08:00
sctp Fix memory leak in discard case of sctp_sf_abort_violation() 2007-11-12 10:13:24 -05:00
sunrpc
tipc
unix [UNIX]: The unix_nr_socks limit can be exceeded 2007-11-10 22:08:30 -08:00
wanrouter
wireless
x25
xfrm
Kconfig
Makefile
TUNABLE
compat.c
nonet.c
socket.c [NET]: Add the helper kernel_sock_shutdown() 2007-11-12 18:10:39 -08:00
sysctl_net.c