linux-uconsole/net/core
Cong Wang aa5d265934 pktgen: correctly handle failures when adding a device
[ Upstream commit 604dfd6efc ]

The return value of pktgen_add_device() is not checked, so
even if we fail to add some device, for example, non-exist one,
we still see "OK:...". This patch fixes it.

After this patch, I got:

	# echo "add_device non-exist" > /proc/net/pktgen/kpktgend_0
	-bash: echo: write error: No such device
	# cat /proc/net/pktgen/kpktgend_0
	Running:
	Stopped:
	Result: ERROR: can not add device non-exist
	# echo "add_device eth0" > /proc/net/pktgen/kpktgend_0
	# cat /proc/net/pktgen/kpktgend_0
	Running:
	Stopped: eth0
	Result: OK: add_device=eth0

(Candidate for -stable)

Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Cong Wang <amwang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-14 10:47:34 -08:00
..
datagram.c Fix a typo in datagram.c and sctp/socket.c. 2010-12-06 13:10:11 -08:00
dev.c net-rps: Fix brokeness causing OOO packets 2012-11-26 11:34:36 -08:00
dev_addr_lists.c net: correct check in dev_addr_del() 2012-11-26 11:34:36 -08:00
drop_monitor.c drop_monitor: dont sleep in atomic context 2012-10-02 09:47:42 -07:00
dst.c net: fix NULL dereferences in check_peer_redir() 2012-02-13 11:06:13 -08:00
ethtool.c ethtool: allow ETHTOOL_GSSET_INFO for users 2012-07-16 08:47:37 -07:00
fib_rules.c rtnetlink: Compute and store minimum ifinfo dump size 2013-01-17 08:43:58 -08:00
filter.c bug.h: Move ratelimit warn interfaces to ratelimit.h 2011-05-26 15:00:31 -04:00
flow.c net: Handle different key sizes between address families in flow cache 2011-11-11 09:37:17 -08:00
gen_estimator.c net,rcu: convert call_rcu(__gen_kill_estimator) to kfree_rcu() 2011-05-07 22:50:57 -07:00
gen_stats.c net/core: EXPORT_SYMBOL cleanups 2010-07-12 12:57:55 -07:00
iovec.c net: Limit socket I/O iovec total length to INT_MAX. 2010-10-28 11:47:52 -07:00
kmap_skb.h
link_watch.c net: allow netif_carrier to be called safely from IRQ 2011-08-15 18:31:39 -07:00
Makefile net: Compute protocol sequence numbers and fragment IDs using MD5. 2011-08-15 18:31:35 -07:00
neighbour.c rtnetlink: Compute and store minimum ifinfo dump size 2013-01-17 08:43:58 -08:00
net-sysfs.c Delay struct net freeing while there's a sysfs instance refering to it 2011-06-12 17:45:41 -04:00
net-sysfs.h xps: Add CONFIG_XPS 2010-11-28 18:24:14 -08:00
net-traces.c netdev: Add tracepoints to netdev layer 2010-09-07 17:51:33 +02:00
net_namespace.c net: Statically initialize init_net.dev_base_head 2012-10-02 09:47:41 -07:00
netevent.c net/core: EXPORT_SYMBOL cleanups 2010-07-12 12:57:55 -07:00
netpoll.c netpoll: fix netpoll_send_udp() bugs 2012-07-16 08:47:38 -07:00
pktgen.c pktgen: correctly handle failures when adding a device 2013-02-14 10:47:34 -08:00
request_sock.c Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2010-12-08 13:47:38 -08:00
rtnetlink.c rtnetlink: fix rtnl_calcit() and rtnl_dump_ifinfo() 2013-01-17 08:43:58 -08:00
scm.c scm: Capture the full credentials of the scm sender 2011-10-03 11:40:54 -07:00
secure_seq.c net: Compute protocol sequence numbers and fragment IDs using MD5. 2011-08-15 18:31:35 -07:00
skbuff.c net: fix a race in sock_queue_err_skb() 2012-04-27 09:51:19 -07:00
sock.c net: guard tcp_set_keepalive() to tcp sockets 2012-10-13 05:28:07 +09:00
stream.c net: Fix the condition passed to sk_wait_event() 2010-10-03 20:41:32 -07:00
sysctl_net_core.c net: Kill ratelimit.h dependency in linux/net.h 2011-05-27 13:41:33 -04:00
timestamping.c net: hold sock reference while processing tx timestamps 2011-11-11 09:35:52 -08:00
user_dma.c net/core/user_dma.c: Use frag list abstraction interfaces. 2009-06-09 00:19:10 -07:00
utils.c net: Kill ratelimit.h dependency in linux/net.h 2011-05-27 13:41:33 -04:00