diff options
author | Takashi Iwai <tiwai@suse.de> | 2017-11-06 20:16:50 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-11-15 15:53:18 +0100 |
commit | b35783871190a8fcf31c2216638b92bcb2bf152e (patch) | |
tree | 02da751064d2d528e134fdfb703a50ae29df4867 /include | |
parent | 4b52c3170bd82bb905531c3f745be9f64f6af9ba (diff) | |
download | linux-stable-b35783871190a8fcf31c2216638b92bcb2bf152e.tar.gz linux-stable-b35783871190a8fcf31c2216638b92bcb2bf152e.tar.bz2 linux-stable-b35783871190a8fcf31c2216638b92bcb2bf152e.zip |
ALSA: seq: Avoid invalid lockdep class warning
commit 3510c7aa069aa83a2de6dab2b41401a198317bdc upstream.
The recent fix for adding rwsem nesting annotation was using the given
"hop" argument as the lock subclass key. Although the idea itself
works, it may trigger a kernel warning like:
BUG: looking up invalid subclass: 8
....
since the lockdep has a smaller number of subclasses (8) than we
currently allow for the hops there (10).
The current definition is merely a sanity check for avoiding the too
deep delivery paths, and the 8 hops are already enough. So, as a
quick fix, just follow the max hops as same as the max lockdep
subclasses.
Fixes: 1f20f9ff57ca ("ALSA: seq: Fix nested rwsem annotation for lockdep splat")
Reported-by: syzbot <syzkaller@googlegroups.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/sound/seq_kernel.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/sound/seq_kernel.h b/include/sound/seq_kernel.h index feb58d455560..4b9ee3009aa0 100644 --- a/include/sound/seq_kernel.h +++ b/include/sound/seq_kernel.h @@ -49,7 +49,8 @@ typedef union snd_seq_timestamp snd_seq_timestamp_t; #define SNDRV_SEQ_DEFAULT_CLIENT_EVENTS 200 /* max delivery path length */ -#define SNDRV_SEQ_MAX_HOPS 10 +/* NOTE: this shouldn't be greater than MAX_LOCKDEP_SUBCLASSES */ +#define SNDRV_SEQ_MAX_HOPS 8 /* max size of event size */ #define SNDRV_SEQ_MAX_EVENT_LEN 0x3fffffff |