Re: [RFC PATCH] i2c: acpi: put device when verifying client fails

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxxxx>
> > > 
> > > 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





[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux