diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index 7d1c2fc4476a..f07fafd873bc 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c @@ -2679,7 +2679,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); } }