aboutsummaryrefslogtreecommitdiff
path: root/scripts/gdb/linux/config.py
diff options
context:
space:
mode:
authorPeter Ujfalusi <[email protected]>2023-01-27 14:00:30 +0200
committerMark Brown <[email protected]>2023-01-27 12:14:12 +0000
commitf94f3915274d22d5cd8b253e0533822b934f5f41 (patch)
treebe75eab49be989a4ededc1869035fa38eb3ee6a5 /scripts/gdb/linux/config.py
parent955a6f131a50c3685c560ef7b75880d272337b33 (diff)
ASoC: SOF: Protect swidget->use_count with mutex for kcontrol access race
The use_count of the swidget is protect by ALSA core PCM locking with the exception when an associated kcontrol is changed. It has been observed that a rightly timed kcontrol access during stream stop can result of an attempt to send a control update to a widget which has been freed up between the check of the use_count and the message sending. We need to protect the entire sof_widget_setup() and sof_widget_free() execution to make it safe to rely on the use_count. Move the code under an _unlocked() function and use a mutex to protect the execution of the functions for concurrency. On the control path we need to use the lock only for the kcontrol access, the widget_kcontrol_setup() op is called with the lock already held. Reported-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Peter Ujfalusi <[email protected]> Reviewed-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
Diffstat (limited to 'scripts/gdb/linux/config.py')
0 files changed, 0 insertions, 0 deletions