Hi Willem,
Thanks for the careful review - you are right, the conn->freed write in
smc_conn_free() (under lock_sock) and the new read in smc_cdc_msg_recv()
(under bh_lock_sock) are not mutually excluded and would trigger a KCSAN
data race.
I have sent v3 with WRITE_ONCE(conn->freed, ...) in smc_conn_free() and
smc_conn_create() paired with READ_ONCE(smc->conn.freed) on the CDC side.
Thanks,
Qican Ma
Re: [PATCH net v2] net/smc: serialize clcsock release against CDC receive path
- From
- goon…@gmail.com (Qican Ma)
- Organization
- Usenet Network
- Message-ID
- <1796…@gmail.com>
- Date
- Newsgroups
- linux.kernel.netdev