在 2022/5/6 下午1:22, D. Wythe 写道:
From: "D. Wythe" <alibuda@xxxxxxxxxxxxxxxxx> The following scenarios exist: lnk->refcnt=1; smcr_link_put(lnk); lnk->refcnt=0; smcr_link_hold(lnk); __smcr_link_clear(lnk); do_xxx(lnk); This patch try using refcount_inc_not_zero() instead refcount_inc() to prevent this race condition. Therefore, we need to always check its return value, and respond with an error when it fails. Fixes: 20c9398d3309 ("net/smc: Resolve the race between SMC-R link access and clear") Signed-off-by: D. Wythe <alibuda@xxxxxxxxxxxxxxxxx>
Wrong subject prefix here, please ignore this patch, we will send another revison later.
Thanks. D. Wythe