Skip to content
Commit 2b7890e7 authored by Jonas Jensen's avatar Jonas Jensen Committed by David S. Miller
Browse files

net: moxa: continue loop on skb allocation failure



If netdev_alloc_skb_ip_align() fails, subsequent code will
try to dereference an invalid pointer.

Continue to next descriptor on error.

While we're at it,

1. eliminate the chance of an endless loop, replace the main
   loop with while(rx < budget)

2. use napi_complete() and remove the explicit napi_gro_flush()

Signed-off-by: default avatarJonas Jensen <jonas.jensen@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 777fbc31
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment