All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Lawnick <ml.lawnick-Mmb7MZpHnFY@public.gmane.org>
To: khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: i2c-core multiplexer handling triggers dep-lock validator
Date: Tue, 04 Sep 2012 14:19:47 +0200	[thread overview]
Message-ID: <5045F1E3.10407@gmx.de> (raw)

Hi Jean, *

our local kernel maintainers decided to switch on lock dependency check
(CONFIG_PROVE_LOCKING) and this got a hit when multiplexer is removed
while sub devices to its ports are registered:
> hpd_i2c_disconn/15357 is trying to acquire lock:
>  (&adap->userspace_clients_lock){+.+.+.}, at: [<ffffffff80417a14>] i2c_del_adapter+0xe4/0x350
> 
> but task is already holding lock:
>  (&adap->userspace_clients_lock){+.+.+.}, at: [<ffffffff804174cc>] i2c_sysfs_delete_device+0x74/0x218
> 
> other info that might help us debug this:
> 2 locks held by hpd_i2c_disconn/15357:
>  #0:  (&buffer->mutex){+.+.+.}, at: [<ffffffff80276d4c>] sysfs_write_file+0x4c/0x208
>  #1:  (&adap->userspace_clients_lock){+.+.+.}, at: [<ffffffff804174cc>] i2c_sysfs_delete_device+0x74/0x218

Looking into matters I found that all is ok, this is a false positive.
lockdep-design.txt handles this situation on a hard-disc example and
recommends usage of mutex_lock_nested().

Are you already aware of the problem, even have already a patch in queue
or is this waiting for a volunteer?

-- 
KR
Michael

             reply	other threads:[~2012-09-04 12:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-04 12:19 Michael Lawnick [this message]
     [not found] ` <5045F1E3.10407-Mmb7MZpHnFY@public.gmane.org>
2012-09-04 12:28   ` i2c-core multiplexer handling triggers dep-lock validator Jean Delvare

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5045F1E3.10407@gmx.de \
    --to=ml.lawnick-mmb7mzphnfy@public.gmane.org \
    --cc=khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org \
    --cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.