]> git.baikalelectronics.ru Git - kernel.git/commit
OVS: Ignore negative headroom value
authorIan Wienand <iwienand@redhat.com>
Wed, 3 Aug 2016 05:44:57 +0000 (15:44 +1000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 6 Aug 2016 04:06:11 +0000 (00:06 -0400)
commit52547e07cf3dd8e7ba774db47df4bb5e098b68e8
tree917fe7b0dcabc632616371adae06a06ac550ae2d
parent9dbef505d03c2be6bd66e380c5fa8779e9272145
OVS: Ignore negative headroom value

net_device->ndo_set_rx_headroom (introduced in
c5cad73c401d1eed4194b8b79944c1451df00e42) says

  "Setting a negtaive value reset the rx headroom
   to the default value".

It seems that the OVS implementation in
ba8720efad03a241c2721f6d61b523413bd8984b overlooked this and sets
dev->needed_headroom unconditionally.

This doesn't have an immediate effect, but can mess up later
LL_RESERVED_SPACE calculations, such as done in
net/ipv6/mcast.c:mld_newpack.  For reference, this issue was found
from a skb_panic raised there after the length calculations had given
the wrong result.

Note the other current users of this interface
(drivers/net/tun.c:tun_set_headroom and
drivers/net/veth.c:veth_set_rx_headroom) are both checking this
correctly thus need no modification.

Thanks to Ben for some pointers from the crash dumps!

Cc: Benjamin Poirier <bpoirier@suse.com>
Cc: Paolo Abeni <pabeni@redhat.com>
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1361414
Signed-off-by: Ian Wienand <iwienand@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/openvswitch/vport-internal_dev.c