summaryrefslogtreecommitdiff
path: root/tools/lib/python/kdoc/python_version.py
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2026-10-07 19:20:42 +0200
committerTakashi Iwai <tiwai@suse.de>2026-10-08 08:47:07 +0200
commit905a07c711baf184d01aebd3cf9028a89bcd8b7f (patch)
tree2b34c889ff150cd82557985836aef766f27cf986 /tools/lib/python/kdoc/python_version.py
parentf701f6738de2d11e206a74d2a81465051dbf1ba3 (diff)
ALSA: pcmtest: Fix a bogus pointer read in snd_pcmtst_pcm_pointer()
Sashiko reported a potential bogus value for a pcmtest driver when a concurrent call to PCM pointer is invoked while the pcmtest's timer callback is running: since the position is updated in the timer callback without locking, the following wrapping in inc_buf_pos() might be screwed up: if (v_iter->buf_pos >= bytes) v_iter->buf_pos %= bytes; Although it was reported as an OOB, the actual return is corrected inside buffer_size, so no corruption is expected in this scenario, but an error message could show a bogus value. Also, the whole state is read and modified locklessly in the timer callback, which can be racy against the pause operation, too. For avoiding those races, simply put the PCM stream lock in the timer callback (while the snd_pcm_period_elapsed() must be changed to its *_under_stream_lock() variant for avoiding the deadlock). Reported-by: Sashiko <sashiko-bot@kernel.org> Fixes: 315a3d57c64c ("ALSA: Implement the new Virtual PCM Test Driver") Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20261007172051.13240-7-tiwai@suse.de
Diffstat (limited to 'tools/lib/python/kdoc/python_version.py')
0 files changed, 0 insertions, 0 deletions