RE: [PATCH] scsi: cxgbi: fix retry_timer use-after-free on adapter detach
Varun Prakash <[email protected]>
| Newsgroups | org.kernel.vger.stable,org.kernel.vger.linux-kernel,org.kernel.vger.linux-scsi |
|---|---|
| Message-ID | <IA0PPF73BED5E32280057B3EBBA6889877DBCDB2@IA0PPF73BED5E32.namprd12.prod.outlook.com> |
>@@ -1001,6 +1001,15 @@ static void csk_act_open_retry_timer(struct timer_list *t)
> cxgbi_sock_get(csk);
> spin_lock_bh(&csk->lock);
>
>+ if (cxgbi_sock_flag(csk, CTPF_OFFLOAD_DOWN)) {
>+ spin_unlock_bh(&csk->lock);
>+ cxgbi_sock_put(csk);
>+ return;
>+ }
>+
>+ lldi = cxgbi_cdev_priv(csk->cdev);
>+ t4 = is_t4(lldi->adapter_type);
>+
With this patch csk->cdev will always be valid, so there is no need to
move these assignments here.
Thanks for the patch, please send v2 without lldi and t4 assignment change.