linux/net/core
Eric Dumazet 954fba0274 netpoll: fix netpoll_send_udp() bugs
Bogdan Hamciuc diagnosed and fixed following bug in netpoll_send_udp() :

"skb->len += len;" instead of "skb_put(skb, len);"

Meaning that _if_ a network driver needs to call skb_realloc_headroom(),
only packet headers would be copied, leaving garbage in the payload.

However the skb_realloc_headroom() must be avoided as much as possible
since it requires memory and netpoll tries hard to work even if memory
is exhausted (using a pool of preallocated skbs)

It appears netpoll_send_udp() reserved 16 bytes for the ethernet header,
which happens to work for typicall drivers but not all.

Right thing is to use LL_RESERVED_SPACE(dev)
(And also add dev->needed_tailroom of tailroom)

This patch combines both fixes.

Many thanks to Bogdan for raising this issue.

Reported-by: Bogdan Hamciuc <bogdan.hamciuc@freescale.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Tested-by: Bogdan Hamciuc <bogdan.hamciuc@freescale.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Neil Horman <nhorman@tuxdriver.com>
Reviewed-by: Neil Horman <nhorman@tuxdriver.com>
Reviewed-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-13 15:57:31 -07:00
..
datagram.c
dev_addr_lists.c
dev.c net: napi_frags_skb() is static 2012-05-19 02:51:00 -04:00
drop_monitor.c drop_monitor: dont sleep in atomic context 2012-06-04 11:42:01 -04:00
dst.c
ethtool.c
fib_rules.c
filter.c net/core: fix kernel-doc warnings 2012-06-08 22:20:58 -07:00
flow_dissector.c
flow.c
gen_estimator.c
gen_stats.c
iovec.c
link_watch.c
Makefile
neighbour.c net: neighbour: fix neigh_dump_info() 2012-06-07 13:02:21 -07:00
net_namespace.c net: core: Use pr_<level> 2012-05-17 05:00:04 -04:00
net-sysfs.c
net-sysfs.h
net-traces.c
netevent.c
netpoll.c netpoll: fix netpoll_send_udp() bugs 2012-06-13 15:57:31 -07:00
netprio_cgroup.c Merge branch 'for-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup 2012-05-22 17:40:19 -07:00
pktgen.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-05-20 21:53:04 -04:00
request_sock.c
rtnetlink.c net: Convert net_ratelimit uses to net_<level>_ratelimited 2012-05-15 13:45:03 -04:00
scm.c
secure_seq.c
skbuff.c net/core: fix kernel-doc warnings 2012-06-08 22:20:58 -07:00
sock_diag.c
sock.c net: sock: validate data_len before allocating skb in sock_alloc_send_pskb() 2012-05-31 18:22:45 -04:00
stream.c
sysctl_net_core.c
timestamping.c
user_dma.c
utils.c