From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Wolfram Sang <wsa@the-dreams.de>
Cc: linux-i2c@vger.kernel.org, linux-acpi@vger.kernel.org,
linux-renesas-soc@vger.kernel.org,
Mika Westerberg <mika.westerberg@linux.intel.com>,
Jarkko Nikula <jarkko.nikula@linux.intel.com>,
Wolfram Sang <wsa+renesas@sang-engineering.com>,
Geert Uytterhoeven <geert+renesas@glider.be>
Subject: Re: [RFC PATCH] i2c: acpi: put device when verifying client fails
Date: Thu, 12 Mar 2020 16:51:41 +0200 [thread overview]
Message-ID: <20200312145141.GY1922688@smile.fi.intel.com> (raw)
In-Reply-To: <20200312144908.GX1922688@smile.fi.intel.com>
On Thu, Mar 12, 2020 at 04:49:08PM +0200, Andy Shevchenko wrote:
> On Thu, Mar 12, 2020 at 04:47:39PM +0200, Andy Shevchenko wrote:
> > On Thu, Mar 12, 2020 at 02:32:44PM +0100, Wolfram Sang wrote:
> > > From: Wolfram Sang <wsa+renesas@sang-engineering.com>
> > >
> > > i2c_verify_client() can fail, so we need to put the device when that
> > > happens.
> >
> > NAK, this will do double put and messing up with reference counters.
> > Besides the fact, that device may disappear after looking up which leads us to
> > even more problems.
> >
> > See how i2c_acpi_find_client_by_adev() is used in callers.
>
> Perhaps proper "fix" is to add the explanation to a comment in the code to
> prevent false positive reports in the future?
Ah, sorry, I need to read it more carefully...
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2020-03-12 14:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-12 13:32 [RFC PATCH] i2c: acpi: put device when verifying client fails Wolfram Sang
2020-03-12 13:38 ` Geert Uytterhoeven
2020-03-12 14:47 ` Andy Shevchenko
2020-03-12 14:49 ` Andy Shevchenko
2020-03-12 14:51 ` Andy Shevchenko [this message]
2020-03-12 15:14 ` Andy Shevchenko
2020-03-13 11:29 ` Mika Westerberg
2020-03-13 14:16 ` Wolfram Sang
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=20200312145141.GY1922688@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=geert+renesas@glider.be \
--cc=jarkko.nikula@linux.intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=wsa+renesas@sang-engineering.com \
--cc=wsa@the-dreams.de \
/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.