summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2020-12-06 09:34:56 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-01-09 13:35:50 +0100
commitc1fcb6dbd154e66b850c38b762a655575c1597c6 (patch)
tree46c56b097aaf107c2d18086b0eb8fb2d538397ec /sound
parenta51a49bc55ee46eaa0cc8da9896100da403b5541 (diff)
downloadlinux-stable-c1fcb6dbd154e66b850c38b762a655575c1597c6.tar.gz
linux-stable-c1fcb6dbd154e66b850c38b762a655575c1597c6.tar.bz2
linux-stable-c1fcb6dbd154e66b850c38b762a655575c1597c6.zip
ALSA: seq: Use bool for snd_seq_queue internal flags
commit 4ebd47037027c4beae99680bff3b20fdee5d7c1e upstream. The snd_seq_queue struct contains various flags in the bit fields. Those are categorized to two different use cases, both of which are protected by different spinlocks. That implies that there are still potential risks of the bad operations for bit fields by concurrent accesses. For addressing the problem, this patch rearranges those flags to be a standard bool instead of a bit field. Reported-by: syzbot+63cbe31877bb80ef58f5@syzkaller.appspotmail.com Link: https://lore.kernel.org/r/20201206083456.21110-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/core/seq/seq_queue.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/core/seq/seq_queue.h b/sound/core/seq/seq_queue.h
index 719093489a2c..7909cf6040e3 100644
--- a/sound/core/seq/seq_queue.h
+++ b/sound/core/seq/seq_queue.h
@@ -40,10 +40,10 @@ struct snd_seq_queue {
struct snd_seq_timer *timer; /* time keeper for this queue */
int owner; /* client that 'owns' the timer */
- unsigned int locked:1, /* timer is only accesibble by owner if set */
- klocked:1, /* kernel lock (after START) */
- check_again:1,
- check_blocked:1;
+ bool locked; /* timer is only accesibble by owner if set */
+ bool klocked; /* kernel lock (after START) */
+ bool check_again; /* concurrent access happened during check */
+ bool check_blocked; /* queue being checked */
unsigned int flags; /* status flags */
unsigned int info_flags; /* info for sync */