android_kernel_google_msm/net/core
Cong Wang 6c1128b87d 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:49:05 -08:00
..
datagram.c
dev.c net-rps: Fix brokeness causing OOO packets 2012-11-26 11:37:47 -08:00
dev_addr_lists.c net: correct check in dev_addr_del() 2012-11-26 11:37:46 -08:00
drop_monitor.c drop_monitor: dont sleep in atomic context 2012-07-16 09:03:44 -07:00
dst.c
ethtool.c
fib_rules.c
filter.c bpf jit: Make the filter.c::__load_pointer helper non-static for the jits 2012-04-03 18:01:03 -04:00
flow.c
flow_dissector.c
gen_estimator.c
gen_stats.c
iovec.c
kmap_skb.h
link_watch.c
Makefile
neighbour.c net: Fix skb_under_panic oops in neigh_resolve_output 2012-10-28 10:14:15 -07:00
net-sysfs.c
net-sysfs.h
net-traces.c
net_namespace.c net: Statically initialize init_net.dev_base_head 2012-10-02 10:30:35 -07:00
netevent.c
netpoll.c netpoll: fix netpoll_send_udp() bugs 2012-07-16 09:03:47 -07:00
netprio_cgroup.c
pktgen.c pktgen: correctly handle failures when adding a device 2013-02-14 10:49:05 -08:00
request_sock.c
rtnetlink.c net: feed /dev/random with the MAC address when registering a device 2012-08-15 08:10:28 -07:00
scm.c
secure_seq.c
skbuff.c splice: fix racy pipe->buffers uses 2012-07-16 09:04:42 -07:00
sock.c net: guard tcp_set_keepalive() to tcp sockets 2012-10-13 05:38:44 +09:00
sock_diag.c
stream.c
sysctl_net_core.c
timestamping.c
user_dma.c
utils.c