All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Sverdlin <alexander.sverdlin@nokia.com>
To: Wolfram Sang <wsa@kernel.org>,
	linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] i2c: core: Workaround false-positive LOCKDEP in delete_device
Date: Mon, 23 May 2022 09:15:26 +0200	[thread overview]
Message-ID: <bbb5d2b0-7fbc-0b7d-d58e-355ef1871a1e@nokia.com> (raw)
In-Reply-To: <Yoi17igIZH7y2Hy0@shikoro>

Hello Wolfram,

On 21/05/2022 11:50, Wolfram Sang wrote:
>> +			/*
>> +			 * We drop the mutex here, because device unregister
>> +			 * will take sysfs lock (kn->count) which, as LOCKDEP
>> +			 * would think, depends on this mutex
>> +			 */
> I have to ask: can't lockdep be fixed or the lock somehow be annotated
> to prevent the false positive?

I would be happy to test any other proposal, I personally didn't find other working
approach until now. This particular patch actually has an advantage of reducing the
locked region, which makes sense if only userspace_clients is protected by the mutex.

-- 
Best regards,
Alexander Sverdlin.

      reply	other threads:[~2022-05-23  7:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-17  7:55 [PATCH] i2c: core: Workaround false-positive LOCKDEP in delete_device Alexander A Sverdlin
2022-05-21  9:50 ` Wolfram Sang
2022-05-23  7:15   ` Alexander Sverdlin [this message]

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=bbb5d2b0-7fbc-0b7d-d58e-355ef1871a1e@nokia.com \
    --to=alexander.sverdlin@nokia.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wsa@kernel.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.