• Aurelien Jacobs's avatar
    asix: fix infinite loop in rx_fixup() · 4a75c219
    Aurelien Jacobs authored
    commit 6c15d74d upstream.
    
    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: default avatarAurelien Jacobs <aurel@gnuage.org>
    Cc: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    4a75c219
asix.c 42.6 KB