|
|
Re: [PATCH] netpoll: fix netpoll_send_udp() bugs |
On Wed, Jun 13, 2012 at 07:30:21AM +0200, Eric Dumazet wrote: > From: Eric Dumazet <edumazet@xxxxxxxxxx> > > 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@xxxxxxxxxxxxx> > Signed-off-by: Eric Dumazet <edumazet@xxxxxxxxxx> > Tested-by: Bogdan Hamciuc <bogdan.hamciuc@xxxxxxxxxxxxx> > Cc: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> > Cc: Neil Horman <nhorman@xxxxxxxxxxxxx> Reviewed-by: Neil Horman <nhorman@xxxxxxxxxxxxx> > -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
[Linux Kernel Discussion] [Ethernet Bridging] [Linux Wireless Networking] [Linux Bluetooth Networking] [Linux Networking Users] [VLAN] [Git] [IETF Annouce] [Linux Assembly] [Security] [Bugtraq] [Photo] [Singles Social Networking] [Yosemite Information] [MIPS Linux] [ARM Linux Kernel] [ARM Linux] [Linux Virtualization] [Linux Security] [Linux IDE] [Linux RAID] [Linux SCSI] [Free Dating]
![]() |
![]() |