Re: [PATCH net v2] net/smc: prevent device removal during connection setup
| Newsgroups | org.kernel.vger.linux-s390 |
|---|---|
| Message-ID | <[email protected]> |
> From: Chengfeng Ye <[email protected]> > > smc_pnet_determine_gid() stores an smc_ib_device pointer in connection > initialization data while holding smc_ib_devices.mutex. Connection setup > keeps using the pointer after releasing the mutex, but device removal only > waits for links which have already incremented lnk_cnt. > > This permits the following interleaving: > > connection setup device removal > ---------------- -------------- > select smcibdev > store ini->smcrv2.ib_dev_v2 > mutex_unlock() > remove smcibdev from the device list > [ ... ] > > Fixes: a046d57da19f ("smc: CLC handshake (incl. preparation steps)") > Cc: [email protected] > Signed-off-by: Chengfeng Ye <[email protected]> > Signed-off-by: Qi Zhang <[email protected]> Sashiko has reviewed this patch and found no issues. It looks great! -- Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1