Re: [PATCH] megaraid: Fix a sleep-in-atomic bug

2017-05-31 Thread Jia-Ju Bai
...@oracle.com Cc: megaraidlinux@broadcom.com; linux-scsi@vger.kernel.org; linux- ker...@vger.kernel.org; Jia-Ju Bai Subject: [PATCH] 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

RE: [PATCH] megaraid: Fix a sleep-in-atomic bug

2017-05-31 Thread Sumit Saxena
>Cc: megaraidlinux@broadcom.com; linux-scsi@vger.kernel.org; linux- >ker...@vger.kernel.org; Jia-Ju Bai >Subject: [PATCH] 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_i

[PATCH] megaraid: Fix a sleep-in-atomic bug

2017-05-30 Thread Jia-Ju Bai
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". Signed-off-by: Jia-Ju Bai --- drivers/scsi/megaraid/megaraid_m