Re: [PATCH net-next 2/2] net: datagram: drop 'destructor' argument from several helpers
From: Paolo Abeni <pabeni@redhat.com>
Date: 2020-02-27 14:36:38
From: Paolo Abeni <pabeni@redhat.com>
Date: 2020-02-27 14:36:38
On Thu, 2020-02-27 at 15:31 +0300, Kirill Tkhai wrote:
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.cquoted
index 145a3965341e..194e7b93e404 100644--- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c@@ -2102,9 +2102,11 @@ static int unix_dgram_recvmsg(struct socket *sock, struct msghdr *msg, skip = sk_peek_offset(sk, flags); skb = __skb_try_recv_datagram(sk, &sk->sk_receive_queue, flags, - scm_stat_del, &skip, &err, &last); - if (skb) + &skip, &err, &last); + if (skb) { + scm_stat_del(sk, skb);Shouldn't we care about MSG_PEEK here?
Thank you for checking this! You are right, I'll fix in the next iteration. Cheers, Paolo