Skip to content
Commit a4ca8b7d authored by Edward Cree's avatar Edward Cree Committed by David S. Miller
Browse files

net: ipv4: fix drop handling in ip_list_rcv() and ip_list_rcv_finish()

Since callees (ip_rcv_core() and ip_rcv_finish_core()) might free or steal
 the skb, we can't use the list_cut_before() method; we can't even do a
 list_del(&skb->list) in the drop case, because skb might have already been
 freed and reused.
So instead, take each skb off the source list before processing, and add it
 to the sublist afterwards if it wasn't freed or stolen.

Fixes: 5fa12739 net: ipv4: listify ip_rcv_finish
Fixes: 17266ee9

 net: ipv4: listified version of ip_rcv
Signed-off-by: default avatarEdward Cree <ecree@solarflare.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0eaec62a
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