Hi Mahanta,
Thanks for the detailed review.
You are right on both counts. I verified that 46c28dbd4c23 introduced
the clcsock->sk->sk_shutdown write into the tasklet-context receive
path, while b38d732477e4 predates both halves of the race.
I have sent v4 with both issues addressed:
1. The Fixes: tag now points at 46c28dbd4c23.
2. The patch now closes the class rather than only the CDC site:
smc_tx_is_corked() guards on conn->freed (and a NULL clcsock check)
before dereferencing. Since both the writer in smc_conn_free() and
this reader run under lock_sock(), the access is race-free; a dying
connection is reported as corked so that no further RDMA writes are
triggered while teardown is in progress.
I will also review your clcsock lifetime series; as you say it is
net-next hardening and complementary to this targeted stable fix.
Thanks,
Qican Ma
Re: [PATCH net v3] 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