mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-06 02:50:43 +00:00
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>
This commit is contained in:
parent
248c9fb041
commit
dc6d2a0f97
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue