[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230819201716.2430-1-xqjcool@gmail.com>
Date: Sat, 19 Aug 2023 13:17:16 -0700
From: Qingjie Xing <xqjcool@...il.com>
To: edumazet@...gle.com
Cc: davem@...emloft.net, dhowells@...hat.com, fw@...len.de,
johannes@...solutions.net, keescook@...omium.org, kuba@...nel.org,
kuniyu@...zon.com, linux-kernel@...r.kernel.org,
netdev@...r.kernel.org, pabeni@...hat.com, pctammela@...atatu.com,
xqjcool@...il.com
Subject: [PATCH] netlink: Fix the netlink socket malfunction due to concurrency
This piece of code has been present since the Linux code v2.6.12 was
incorporated into Git management.
I believe this modification could potentially address the concurrent issue
we've been discussing.
In netlink_rcv_wake(), as described in [2], the socket's receive queue is
empty, indicated by sk_rmem_alloc being 0. At this point, concurrent
netlink_attachskb() calls netlink_overrun(). In this critical state, the
sk_rmem_alloc of the socket will not instantly transition from 0 to a
value greater than sk_rcvbuf.
Powered by blists - more mailing lists