Files
erofs-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 <[email protected]>
Signed-off-by: Eric Dumazet <[email protected]>
Tested-by: Bogdan Hamciuc <[email protected]>
Cc: Herbert Xu <[email protected]>
Cc: Neil Horman <[email protected]>
Reviewed-by: Neil Horman <[email protected]>
Reviewed-by: Cong Wang <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
2012-06-13 15:57:31 -07:00
..
2012-05-19 02:51:00 -04:00
…
2012-04-02 04:33:44 -04:00
2012-06-08 22:20:58 -07:00
2012-04-02 04:33:44 -04:00
…
2012-05-17 05:00:04 -04:00
2012-06-13 15:57:31 -07:00
2012-03-28 18:30:03 +01:00
2012-01-17 10:31:12 -05:00
2012-06-08 22:20:58 -07:00
…