Thread (8 messages) 8 messages, 3 authors, 2020-02-28

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

On Thu, 2020-02-27 at 15:31 +0300, Kirill Tkhai wrote:
quoted hunk ↗ jump to hunk
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help