* [PATCH -next] scsi: be2iscsi: Use GFP_ATOMIC under spin lock
@ 2017-01-12 14:21 Wei Yongjun
2017-01-18 5:06 ` Jitendra Bhivare
2017-01-20 21:58 ` Martin K. Petersen
0 siblings, 2 replies; 3+ messages in thread
From: Wei Yongjun @ 2017-01-12 14:21 UTC (permalink / raw)
To: Subbu Seetharaman, Ketan Mukadam, Jitendra Bhivare,
James E.J. Bottomley, Martin K. Petersen
Cc: Wei Yongjun, linux-scsi
From: Wei Yongjun <weiyongjun1@huawei.com>
A spin lock is taken here so we should use GFP_ATOMIC.
Fixes: 987132167f4b ("scsi: be2iscsi: Fix for crash in beiscsi_eh_device_reset")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
drivers/scsi/be2iscsi/be_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c
index 6372613..c9b9daa 100644
--- a/drivers/scsi/be2iscsi/be_main.c
+++ b/drivers/scsi/be2iscsi/be_main.c
@@ -294,7 +294,7 @@ static int beiscsi_eh_device_reset(struct scsi_cmnd *sc)
beiscsi_conn = conn->dd_data;
phba = beiscsi_conn->phba;
- inv_tbl = kzalloc(sizeof(*inv_tbl), GFP_KERNEL);
+ inv_tbl = kzalloc(sizeof(*inv_tbl), GFP_ATOMIC);
if (!inv_tbl) {
spin_unlock_bh(&session->frwd_lock);
beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_EH,
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [PATCH -next] scsi: be2iscsi: Use GFP_ATOMIC under spin lock
2017-01-12 14:21 [PATCH -next] scsi: be2iscsi: Use GFP_ATOMIC under spin lock Wei Yongjun
@ 2017-01-18 5:06 ` Jitendra Bhivare
2017-01-20 21:58 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Jitendra Bhivare @ 2017-01-18 5:06 UTC (permalink / raw)
To: Wei Yongjun, Subramanian Seetharaman, Ketan Mukadam,
James E.J. Bottomley, Martin K. Petersen
Cc: Wei Yongjun, linux-scsi
> -----Original Message-----
> From: Wei Yongjun [mailto:weiyj.lk@gmail.com]
> Sent: Thursday, January 12, 2017 7:52 PM
> To: Subbu Seetharaman; Ketan Mukadam; Jitendra Bhivare; James E.J.
> Bottomley; Martin K. Petersen
> Cc: Wei Yongjun; linux-scsi@vger.kernel.org
> Subject: [PATCH -next] scsi: be2iscsi: Use GFP_ATOMIC under spin lock
>
> From: Wei Yongjun <weiyongjun1@huawei.com>
>
> A spin lock is taken here so we should use GFP_ATOMIC.
>
> Fixes: 987132167f4b ("scsi: be2iscsi: Fix for crash in
beiscsi_eh_device_reset")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
> drivers/scsi/be2iscsi/be_main.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/be2iscsi/be_main.c
b/drivers/scsi/be2iscsi/be_main.c
> index 6372613..c9b9daa 100644
> --- a/drivers/scsi/be2iscsi/be_main.c
> +++ b/drivers/scsi/be2iscsi/be_main.c
> @@ -294,7 +294,7 @@ static int beiscsi_eh_device_reset(struct scsi_cmnd
> *sc)
> beiscsi_conn = conn->dd_data;
> phba = beiscsi_conn->phba;
>
> - inv_tbl = kzalloc(sizeof(*inv_tbl), GFP_KERNEL);
> + inv_tbl = kzalloc(sizeof(*inv_tbl), GFP_ATOMIC);
> if (!inv_tbl) {
> spin_unlock_bh(&session->frwd_lock);
> beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_EH,
Reviewed-by: Jitendra Bhivare <jitendra.bhivare@broadcom.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH -next] scsi: be2iscsi: Use GFP_ATOMIC under spin lock
2017-01-12 14:21 [PATCH -next] scsi: be2iscsi: Use GFP_ATOMIC under spin lock Wei Yongjun
2017-01-18 5:06 ` Jitendra Bhivare
@ 2017-01-20 21:58 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2017-01-20 21:58 UTC (permalink / raw)
To: Wei Yongjun
Cc: Subbu Seetharaman, Ketan Mukadam, Jitendra Bhivare,
James E.J. Bottomley, Martin K. Petersen, Wei Yongjun,
linux-scsi
>>>>> "Wei" == Wei Yongjun <weiyj.lk@gmail.com> writes:
Wei> From: Wei Yongjun <weiyongjun1@huawei.com> A spin lock is taken
Wei> here so we should use GFP_ATOMIC.
Applied to 4.11/scsi-queue.
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-01-20 21:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-12 14:21 [PATCH -next] scsi: be2iscsi: Use GFP_ATOMIC under spin lock Wei Yongjun
2017-01-18 5:06 ` Jitendra Bhivare
2017-01-20 21:58 ` Martin K. Petersen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.