Skip to contentSkip to conversation

scsi: be2iscsi: Use GFP_ATOMIC under spin lock

PATCH Applied Wei Yongjun 3 participants 3 messages Jan 12, 2017 – Jan 20, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scsi: be2iscsi: Use GFP_ATOMIC under spin lock

From: Wei Yongjun <[email protected]>

A spin lock is taken here so we should use GFP_ATOMIC.

Fixes 987132167f4b ("scsi: be2iscsi: Fix for crash in beiscsi_eh_device_reset")
---
 drivers/scsi/be2iscsi/be_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/be2iscsi/be_main.c +1 -1
index 6372613..c9b9daa 100644
@@ -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 on v1 1/1
#1 lore raw
Quoted 8 lines

-----Original Message-----
From: Wei Yongjun [mailto:[email protected]]
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; [email protected]
Subject: [PATCH -next] scsi: be2iscsi: Use GFP_ATOMIC under spin lock

Quoted 5 lines

From: Wei Yongjun <[email protected]>

A spin lock is taken here so we should use GFP_ATOMIC.

Fixes 987132167f4b ("scsi: be2iscsi: Fix for crash in

beiscsi_eh_device_reset")

Review

Quoted 6 lines
---
 drivers/scsi/be2iscsi/be_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
(quoted diff) +0 -0

b/drivers/scsi/be2iscsi/be_main.c

Quoted 12 lines

index 6372613..c9b9daa 100644

drivers/scsi/be2iscsi/be_main.c +1 -1
@@ -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);
Quoted 1 line

beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_EH,