diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index 510b1d6758db..ac3d4b540c10 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c @@ -2589,7 +2589,9 @@ static struct sk_buff *manage_oob(struct sk_buff *skb, struct sock *sk, } } else if (!(flags & MSG_PEEK)) { skb_unlink(skb, &sk->sk_receive_queue); - consume_skb(skb); + WRITE_ONCE(u->oob_skb, NULL); + if (!WARN_ON_ONCE(skb_unref(skb))) + kfree_skb(skb); skb = skb_peek(&sk->sk_receive_queue); } }