RE: [PATCH] scsi: cxgbi: fix retry_timer use-after-free on adapter detach

Varun Prakash <[email protected]>
Newsgroups gmane.linux.scsi,gmane.linux.kernel,gmane.linux.kernel.stable
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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.