aboutsummaryrefslogtreecommitdiff
path: root/scripts/gdb/linux/utils.py
diff options
context:
space:
mode:
authorTakashi Iwai <[email protected]>2023-08-16 18:02:46 +0200
committerTakashi Iwai <[email protected]>2023-08-17 09:23:45 +0200
commitbc41a7228cedc39395d032b2502975e53b7a9180 (patch)
treeaaf5b59beebc5c9616579d4b2bd279e20af07c0a /scripts/gdb/linux/utils.py
parent6a66b01de48855d92450904ccfafda9d692efbb9 (diff)
ALSA: pcm: Don't embed device
So far we use the embedded struct device for each PCM substreams in struct snd_pcm. This may result in UAF when the delayed kobj release is used; each corresponding struct device is still accessed at the (delayed) device release, while the snd_pcm object may be already gone. As a workaround, detach the struct device from the snd_pcm object by allocating via the new snd_device_alloc() helper. A caveat is that we store the PCM substream pointer to drvdata since the device resume and others require the access to it. This patch is based on the fix Curtis posted initially. In this patch, the changes are split and use the new helper function instead. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Jaroslav Kysela <[email protected]> Signed-off-by: Curtis Malainey <[email protected]> Tested-by: Curtis Malainey <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
Diffstat (limited to 'scripts/gdb/linux/utils.py')
0 files changed, 0 insertions, 0 deletions