]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: rawmidi: Avoid bit fields for state flags
authorTakashi Iwai <tiwai@suse.de>
Fri, 14 Feb 2020 11:13:16 +0000 (12:13 +0100)
committerTakashi Iwai <tiwai@suse.de>
Fri, 14 Feb 2020 14:53:19 +0000 (15:53 +0100)
commit64acd818a0ee4ec7f08857c14fb924bc3b163f79
treed1ae76b60f231c1c9b7a33be83ef085ad4c3f397
parent3c3e7e96a68c7e8e774c12dc8de807508608b50b
ALSA: rawmidi: Avoid bit fields for state flags

The rawmidi state flags (opened, append, active_sensing) are stored in
bit fields that can be potentially racy when concurrently accessed
without any locks.  Although the current code should be fine, there is
also no any real benefit by keeping the bitfields for this kind of
short number of members.

This patch changes those bit fields flags to the simple bool fields.
There should be no size increase of the snd_rawmidi_substream by this
change.

Reported-by: syzbot+576cc007eb9f2c968200@syzkaller.appspotmail.com
Link: https://lore.kernel.org/r/20200214111316.26939-4-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
include/sound/rawmidi.h