diff options
author | Neil Horman <nhorman@tuxdriver.com> | 2015-07-07 18:02:18 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-07-09 06:36:11 (GMT) |
commit | 0769636cb5b95665ebadcd1a41c46f331f5a397d (patch) | |
tree | 7e3689eb1a23e1ff97a54f3748dc83add84d17e9 /drivers/misc | |
parent | 974d7af5fcc295dcf8315255142b2fe44fd74b0c (diff) | |
download | linux-0769636cb5b95665ebadcd1a41c46f331f5a397d.tar.xz |
vmxnet3: prevent receive getting out of sequence on napi poll
vmxnet3's current napi path is built to count every rx descriptor we recieve,
and use that as a count of the napi budget. That means its possible to return
from a napi poll halfway through recieving a fragmented packet accross multiple
dma descriptors. If that happens, the next napi poll will start with the
descriptor ring in an improper state (e.g. the first descriptor we look at may
have the end-of-packet bit set), which will cause a BUG halt in the driver.
Fix the issue by only counting whole received packets in the napi poll and
returning that value, rather than the descriptor count.
Tested by the reporter and myself, successfully
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
CC: Shreyas Bhatewara <sbhatewara@vmware.com>
CC: "David S. Miller" <davem@davemloft.net>
Acked-by: Andy Gospodarek <gospo@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/misc')
0 files changed, 0 insertions, 0 deletions