linux/net/core
Herbert Xu fcc5a03ac4 [NET]: Allow netdev REGISTER/CHANGENAME events to fail
This patch adds code to allow errors to be passed up from event
handlers of NETDEV_REGISTER and NETDEV_CHANGENAME.  It also adds
the notifier_from_errno/notifier_to_errnor helpers to pass the
errno value up to the notifier caller.

If an error is detected when a device is registered, it causes
that operation to fail.  A NETDEV_UNREGISTER will be sent to
all event handlers.

Similarly if NETDEV_CHANGENAME fails the original name is restored
and a new NETDEV_CHANGENAME event is sent.

As such all event handlers must be idempotent with respect to
these events.

When an event handler is registered NETDEV_REGISTER events are
sent for all devices currently registered.  Should any of them
fail, we will send NETDEV_GOING_DOWN/NETDEV_DOWN/NETDEV_UNREGISTER
events to that handler for the devices which have already been
registered with it.  The handler registration itself will fail.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-07-31 02:28:15 -07:00
..
datagram.c
dev_mcast.c [NET]: move dev_mc_discard from dev_mcast.c to dev.c 2007-07-18 02:10:54 -07:00
dev.c [NET]: Allow netdev REGISTER/CHANGENAME events to fail 2007-07-31 02:28:15 -07:00
dst.c
ethtool.c
fib_rules.c
filter.c
flow.c mm: Remove slab destructors from kmem_cache_create(). 2007-07-20 10:11:58 +09:00
gen_estimator.c [NET]: gen_estimator deadlock fix 2007-07-18 01:46:50 -07:00
gen_stats.c
iovec.c
kmap_skb.h
link_watch.c
Makefile
neighbour.c mm: Remove slab destructors from kmem_cache_create(). 2007-07-20 10:11:58 +09:00
net-sysfs.c
netevent.c
netpoll.c
pktgen.c [PKTGEN]: Add missing KERN_* tags to printk()s. 2007-07-31 02:28:10 -07:00
request_sock.c
rtnetlink.c [NET] CORE: Fix whitespace errors. 2007-07-19 10:43:23 +09:00
scm.c
skbuff.c mm: Remove slab destructors from kmem_cache_create(). 2007-07-20 10:11:58 +09:00
sock.c [NET]: Add missing entries to family name tables 2007-07-21 19:30:16 -07:00
stream.c
sysctl_net_core.c
user_dma.c
utils.c