mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 03:10:12 +00:00
scsi: megaraid: Fix a sleep-in-atomic bug
The driver may sleep under a spin lock, and the function call path is: mraid_mm_attach_buf (acquire the lock by spin_lock_irqsave) pci_pool_alloc(GFP_KERNEL) --> may sleep To fix it, the "GFP_KERNEL" is replaced with "GFP_ATOMIC". [mkp: fixed whitespace] Signed-off-by: Jia-Ju Bai <baijiaju1990@163.com> Acked-by: Sumit Saxena <sumit.saxena@broadcom.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
566ec9ad31
commit
896f6966fc
1 changed files with 1 additions and 1 deletions
|
@ -574,7 +574,7 @@ mraid_mm_attach_buf(mraid_mmadp_t *adp, uioc_t *kioc, int xferlen)
|
|||
|
||||
kioc->pool_index = right_pool;
|
||||
kioc->free_buf = 1;
|
||||
kioc->buf_vaddr = pci_pool_alloc(pool->handle, GFP_KERNEL,
|
||||
kioc->buf_vaddr = pci_pool_alloc(pool->handle, GFP_ATOMIC,
|
||||
&kioc->buf_paddr);
|
||||
spin_unlock_irqrestore(&pool->lock, flags);
|
||||
|
||||
|
|
Loading…
Reference in a new issue