summaryrefslogtreecommitdiff
path: root/sound/soc/intel
diff options
context:
space:
mode:
authorDuoming Zhou <duoming@zju.edu.cn>2022-06-07 06:26:25 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-08-17 16:15:21 +0300
commite6a4d422002bf46bca0ae350782e03da5fd28188 (patch)
tree630cd221bb02db896737fdd3da85d47be806959e /sound/soc/intel
parent2b1a324933bdda27b00c877d3cd3a6bac3a01440 (diff)
downloadlinux-e6a4d422002bf46bca0ae350782e03da5fd28188.tar.xz
devcoredump: remove the useless gfp_t parameter in dev_coredumpv and dev_coredumpm
[ Upstream commit 77515ebaf01920e2db49e04672ef669a7c2907f2 ] The dev_coredumpv() and dev_coredumpm() could not be used in atomic context, because they call kvasprintf_const() and kstrdup() with GFP_KERNEL parameter. The process is shown below: dev_coredumpv(.., gfp_t gfp) dev_coredumpm(.., gfp_t gfp) dev_set_name kobject_set_name_vargs kvasprintf_const(GFP_KERNEL, ...); //may sleep kstrdup(s, GFP_KERNEL); //may sleep This patch removes gfp_t parameter of dev_coredumpv() and dev_coredumpm() and changes the gfp_t parameter of kzalloc() in dev_coredumpm() to GFP_KERNEL in order to show they could not be used in atomic context. Fixes: 833c95456a70 ("device coredump: add new device coredump class") Reviewed-by: Brian Norris <briannorris@chromium.org> Reviewed-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Duoming Zhou <duoming@zju.edu.cn> Link: https://lore.kernel.org/r/df72af3b1862bac7d8e793d1f3931857d3779dfd.1654569290.git.duoming@zju.edu.cn Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'sound/soc/intel')
-rw-r--r--sound/soc/intel/avs/apl.c2
-rw-r--r--sound/soc/intel/avs/skl.c2
-rw-r--r--sound/soc/intel/catpt/dsp.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/sound/soc/intel/avs/apl.c b/sound/soc/intel/avs/apl.c
index b8e2b23c9f64..1ff57f1a483d 100644
--- a/sound/soc/intel/avs/apl.c
+++ b/sound/soc/intel/avs/apl.c
@@ -164,7 +164,7 @@ static int apl_coredump(struct avs_dev *adev, union avs_notify_msg *msg)
} while (offset < msg->ext.coredump.stack_dump_size);
exit:
- dev_coredumpv(adev->dev, dump, dump_size, GFP_KERNEL);
+ dev_coredumpv(adev->dev, dump, dump_size);
return 0;
}
diff --git a/sound/soc/intel/avs/skl.c b/sound/soc/intel/avs/skl.c
index bda5ec7510fe..3413162768dc 100644
--- a/sound/soc/intel/avs/skl.c
+++ b/sound/soc/intel/avs/skl.c
@@ -88,7 +88,7 @@ static int skl_coredump(struct avs_dev *adev, union avs_notify_msg *msg)
return -ENOMEM;
memcpy_fromio(dump, avs_sram_addr(adev, AVS_FW_REGS_WINDOW), AVS_FW_REGS_SIZE);
- dev_coredumpv(adev->dev, dump, AVS_FW_REGS_SIZE, GFP_KERNEL);
+ dev_coredumpv(adev->dev, dump, AVS_FW_REGS_SIZE);
return 0;
}
diff --git a/sound/soc/intel/catpt/dsp.c b/sound/soc/intel/catpt/dsp.c
index 346bec000306..d2afe9ff1e3a 100644
--- a/sound/soc/intel/catpt/dsp.c
+++ b/sound/soc/intel/catpt/dsp.c
@@ -539,7 +539,7 @@ int catpt_coredump(struct catpt_dev *cdev)
pos += CATPT_DMA_REGS_SIZE;
}
- dev_coredumpv(cdev->dev, dump, dump_size, GFP_KERNEL);
+ dev_coredumpv(cdev->dev, dump, dump_size);
return 0;
}