]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: seq: Avoid invalid lockdep class warning
authorTakashi Iwai <tiwai@suse.de>
Mon, 6 Nov 2017 19:16:50 +0000 (20:16 +0100)
committerTakashi Iwai <tiwai@suse.de>
Mon, 6 Nov 2017 19:25:31 +0000 (20:25 +0100)
commitfd262d9da41c0db207258c019dea6336fad2b56f
tree8af28de7f1a3247856d683267685ab96d5290983
parent3c29b8055a9135769c0bfbedf5f4820f6e6ac4b7
ALSA: seq: Avoid invalid lockdep class warning

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: 710080a88257 ("ALSA: seq: Fix nested rwsem annotation for lockdep splat")
Reported-by: syzbot <syzkaller@googlegroups.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
include/sound/seq_kernel.h