Commit 0ae81ef
ALSA: pcm: Add stream lock during PCM reset ioctl operations
commit 1f68915 upstream.
snd_pcm_reset() is a non-atomic operation, and it's allowed to run
during the PCM stream running. It implies that the manipulation of
hw_ptr and other parameters might be racy.
This patch adds the PCM stream lock at appropriate places in
snd_pcm_*_reset() actions for covering that.
Cc: <stable@vger.kernel.org>
Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Link: https://lore.kernel.org/r/20220322171325.4355-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent b560d67 commit 0ae81ef
1 file changed
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1850 | 1850 | | |
1851 | 1851 | | |
1852 | 1852 | | |
| 1853 | + | |
1853 | 1854 | | |
1854 | 1855 | | |
1855 | 1856 | | |
1856 | 1857 | | |
1857 | 1858 | | |
| 1859 | + | |
1858 | 1860 | | |
1859 | 1861 | | |
1860 | 1862 | | |
1861 | 1863 | | |
1862 | 1864 | | |
1863 | 1865 | | |
1864 | 1866 | | |
| 1867 | + | |
1865 | 1868 | | |
1866 | 1869 | | |
1867 | 1870 | | |
1868 | 1871 | | |
| 1872 | + | |
1869 | 1873 | | |
1870 | 1874 | | |
1871 | 1875 | | |
| |||
0 commit comments