Commit 1f68915
committed
ALSA: pcm: Add stream lock during PCM reset ioctl operations
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>1 parent 69534c4 commit 1f68915
1 file changed
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1864 | 1864 | | |
1865 | 1865 | | |
1866 | 1866 | | |
| 1867 | + | |
1867 | 1868 | | |
1868 | 1869 | | |
1869 | 1870 | | |
1870 | 1871 | | |
1871 | 1872 | | |
| 1873 | + | |
1872 | 1874 | | |
1873 | 1875 | | |
1874 | 1876 | | |
1875 | 1877 | | |
1876 | 1878 | | |
1877 | 1879 | | |
1878 | 1880 | | |
| 1881 | + | |
1879 | 1882 | | |
1880 | 1883 | | |
1881 | 1884 | | |
1882 | 1885 | | |
| 1886 | + | |
1883 | 1887 | | |
1884 | 1888 | | |
1885 | 1889 | | |
| |||
0 commit comments