Skip to content

Commit dc6d2a0

Browse files
khoroshilovChristoph Hellwig
authored andcommitted
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>
1 parent 248c9fb commit dc6d2a0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/scsi/bfa/bfad.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ bfa_fcb_pbc_vport_create(struct bfad_s *bfad, struct bfi_pbc_vport_s pbc_vport)
507507
struct bfad_vport_s *vport;
508508
int rc;
509509

510-
vport = kzalloc(sizeof(struct bfad_vport_s), GFP_KERNEL);
510+
vport = kzalloc(sizeof(struct bfad_vport_s), GFP_ATOMIC);
511511
if (!vport) {
512512
bfa_trc(bfad, 0);
513513
return;

0 commit comments

Comments
 (0)