[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <D743FB35-3736-45E9-9DE1-8E81929D67C1@lca.pw>
Date: Mon, 3 Feb 2020 15:19:13 -0500
From: Qian Cai <cai@....pw>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: davem@...emloft.net, kuba@...nel.org, elver@...gle.com,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] skbuff: fix a data race in skb_queue_len()
> On Feb 3, 2020, at 2:42 PM, Eric Dumazet <eric.dumazet@...il.com> wrote:
>
> We do not want to add READ_ONCE() for all uses of skb_queue_len()
>
> This could hide some real bugs, and could generate slightly less
> efficient code in the cases we have the lock held.
Good point. I should have thought about that. How about introducing 2 new helpers.
skb_queue_len_once()
unix_recvq_full_once()
which will have a READ_ONCE() there, and then unix_dgram_sendmsg() could use that instead?
Powered by blists - more mailing lists