diff options
author | Can Guo <cang@codeaurora.org> | 2019-11-14 22:09:27 -0800 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2019-11-18 23:15:51 -0500 |
commit | cddaebaf3d81584180d647e9cbda4ecbf8e8e71c (patch) | |
tree | 981750ae1d435a54909daff6f9859789b4842780 /drivers/scsi | |
parent | 71d848b8d97ec0f8e993d63cf9de6ac8b3f7c43d (diff) | |
download | linux-cddaebaf3d81584180d647e9cbda4ecbf8e8e71c.tar.bz2 |
scsi: ufs: Fix register dump caused sleep in atomic context
ufshcd_print_host_regs() can be called by interrupt handler, but it may
sleep due to ufshcd_dump_regs() allocates the dump buffer memory with flag
GFP_KERNEL. Fix it by changing GFP_KERNEL to GFP_ATMOIC.
Link: https://lore.kernel.org/r/1573798172-20534-5-git-send-email-cang@codeaurora.org
Reviewed-by: Bean Huo <beanhuo@micron.com>
Signed-off-by: Can Guo <cang@codeaurora.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/ufs/ufshcd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 7bba6bb45035..31ecccf1a15d 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -117,7 +117,7 @@ int ufshcd_dump_regs(struct ufs_hba *hba, size_t offset, size_t len, if (offset % 4 != 0 || len % 4 != 0) /* keep readl happy */ return -EINVAL; - regs = kzalloc(len, GFP_KERNEL); + regs = kzalloc(len, GFP_ATOMIC); if (!regs) return -ENOMEM; |