Skip to content
Commit 64b2a977 authored by Takashi Iwai's avatar Takashi Iwai Committed by Greg Kroah-Hartman
Browse files

ALSA: rawmidi: Access runtime->avail always in spinlock



commit 88a06d6f upstream.

The runtime->avail field may be accessed concurrently while some
places refer to it without taking the runtime->lock spinlock, as
detected by KCSAN.  Usually this isn't a big problem, but for
consistency and safety, we should take the spinlock at each place
referencing this field.

Reported-by: default avatar <syzbot+a23a6f1215c84756577c@syzkaller.appspotmail.com>
Reported-by: default avatar <syzbot+3d367d1df1d2b67f5c19@syzkaller.appspotmail.com>
Link: https://lore.kernel.org/r/20201206083527.21163-1-tiwai@suse.de


Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2c8ccc30
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment