summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexey Khoroshilov <khoroshilov@ispras.ru>2014-04-18 00:58:42 -0700
committerChristoph Hellwig <hch@lst.de>2014-05-19 19:12:22 +0200
commitdc6d2a0f9782cf323acfddb6d98f5dbacc9cd4e3 (patch)
tree96cdae1ffc070d55d237436d1d143d206365298a
parent248c9fb0418e071786b2b91992b5fe711d79f021 (diff)
downloadlinux-dc6d2a0f9782cf323acfddb6d98f5dbacc9cd4e3.tar.gz
linux-dc6d2a0f9782cf323acfddb6d98f5dbacc9cd4e3.tar.bz2
linux-dc6d2a0f9782cf323acfddb6d98f5dbacc9cd4e3.zip
bfa: allocate memory with GFP_ATOMIC in spinlock context
bfa_fcb_pbc_vport_create() is called only from bfa_fcs_pbc_vport_init(), that is called only from bfad_drv_start() with bfad_lock spinlock held. So the patch replaces GFP_KERNEL with GFP_ATOMIC to avoid sleeping in atomic spinlock context. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Acked-by: Anil Gurumurthy <anil.gurumurthy@qlogic.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
-rw-r--r--drivers/scsi/bfa/bfad.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/bfa/bfad.c b/drivers/scsi/bfa/bfad.c
index cc0fbcdc5192..7593b7c1d336 100644
--- a/drivers/scsi/bfa/bfad.c
+++ b/drivers/scsi/bfa/bfad.c
@@ -507,7 +507,7 @@ bfa_fcb_pbc_vport_create(struct bfad_s *bfad, struct bfi_pbc_vport_s pbc_vport)
struct bfad_vport_s *vport;
int rc;
- vport = kzalloc(sizeof(struct bfad_vport_s), GFP_KERNEL);
+ vport = kzalloc(sizeof(struct bfad_vport_s), GFP_ATOMIC);
if (!vport) {
bfa_trc(bfad, 0);
return;