]> git.baikalelectronics.ru Git - kernel.git/commit
asix: fix infinite loop in rx_fixup()
authorAurelien Jacobs <aurel@gnuage.org>
Sat, 7 Jan 2012 20:15:16 +0000 (12:15 -0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 7 Jan 2012 20:15:16 +0000 (12:15 -0800)
commit5aa56ae6eaee52ef1debd40a5f526745925571c1
treec647b38da15453d689c840893564508e27d6a17a
parent7883a7262c7fc5f5256195fb7554db0130a7b741
asix: fix infinite loop in rx_fixup()

At this point if skb->len happens to be 2, the subsequant skb_pull(skb, 4)
call won't work and the skb->len won't be decreased and won't ever reach 0,
resulting in an infinite loop.

With an ASIX 88772 under heavy load, without this patch, rx_fixup() reaches
an infinite loop in less than a minute. With this patch applied,
no infinite loop even after hours of heavy load.

Signed-off-by: Aurelien Jacobs <aurel@gnuage.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/asix.c