Skip to content
Commit ca2c1418 authored by Paolo Abeni's avatar Paolo Abeni Committed by David S. Miller
Browse files

udp: drop head states only when all skb references are gone

After commit 0ddf3fb2

 ("udp: preserve skb->dst if required
for IP options processing") we clear the skb head state as soon
as the skb carrying them is first processed.

Since the same skb can be processed several times when MSG_PEEK
is used, we can end up lacking the required head states, and
eventually oopsing.

Fix this clearing the skb head state only when processing the
last skb reference.

Reported-by: default avatarEric Dumazet <edumazet@google.com>
Fixes: 0ddf3fb2

 ("udp: preserve skb->dst if required for IP options processing")
Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5c25f30c
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