mbox series

[v3,0/2] Re: Problem: lockdep warning with nested instances of i2c-mux

Message ID 20180524135240.10881-1-peda@axentia.se
Headers show
Series Re: Problem: lockdep warning with nested instances of i2c-mux | expand

Message

Peter Rosin May 24, 2018, 1:52 p.m. UTC
Hi!

Sorry for spamming. At least I'm finding these embarrassing f$&%ups
myself, not that it helps all that much, but...

Changes since v2    https://lkml.org/lkml/2018/5/24/176
- EXPORT_SYMBOL_GPL(rt_mutex_lock_nested) is more appropriate (the
  rt_ prefix was missing).

Changes since v1    https://lkml.org/lkml/2018/5/24/93
- Further compile tests indicated a missing #define for rt_mutex_lock
  with lockdep enabled, so that one is added.
- I have verified that I don't get any lockdep splat for a local i2c-mux
  setup with these patches applied, and that I do without them.

Cheers,
Peter

Peter Rosin (2):
  rtmutex: allow specifying a subclass for nested locking
  i2c: mux: annotate the nested rt_mutex usage

 drivers/i2c/i2c-core-base.c |  2 +-
 drivers/i2c/i2c-mux.c       |  4 ++--
 include/linux/rtmutex.h     |  7 +++++++
 kernel/locking/rtmutex.c    | 29 +++++++++++++++++++++++++----
 4 files changed, 35 insertions(+), 7 deletions(-)

Comments

John Sperbeck May 24, 2018, 6:21 p.m. UTC | #1
On Thu, May 24, 2018 at 6:52 AM Peter Rosin <peda@axentia.se> wrote:

> Hi!

> Sorry for spamming. At least I'm finding these embarrassing f$&%ups
> myself, not that it helps all that much, but...

> Changes since v2    https://lkml.org/lkml/2018/5/24/176
> - EXPORT_SYMBOL_GPL(rt_mutex_lock_nested) is more appropriate (the
>    rt_ prefix was missing).


Yes, after fixing the "rt_" typo, this addresses our use case.  Thanks for
the quick response.