Skip to content
  • Takashi Iwai's avatar
    ALSA: seq: Avoid invalid lockdep class warning · b3578387
    Takashi Iwai authored
    commit 3510c7aa 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: 1f20f9ff
    
     ("ALSA: seq: Fix nested rwsem annotation for lockdep splat")
    Reported-by: default avatarsyzbot <syzkaller@googlegroups.com>
    Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    b3578387