lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <p5aiunwdx7vcncsmamq3q7orffrfpmcjzwnrgn2vfczs3y26ak@jxgbwf3bduat>
Date: Thu, 10 Jul 2025 10:45:43 +0000
From: Sean Nyekjaer <sean@...nix.com>
To: Andy Shevchenko <andriy.shevchenko@...el.com>
Cc: Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@....com>, Jonathan Cameron <jic23@...nel.org>, David Lechner <dlechner@...libre.com>, Nuno Sá <nuno.sa@...log.com>, Andy Shevchenko <andy@...nel.org>, linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/6] iio: imu: inv_icm42600: Simplify pm_runtime setup

Hi Andy,

On Thu, Jul 10, 2025 at 12:08:40PM +0100, Andy Shevchenko wrote:
> On Wed, Jul 09, 2025 at 02:35:12PM +0200, Sean Nyekjaer wrote:
> > Remove unnecessary pm_runtime_get_noresume() and pm_runtime_put()
> > calls during probe. These are not required when the device is marked
> > active via pm_runtime_set_active() before enabling pm_runtime with
> > pm_runtime_enable().
> 
> Hmm... What will happen if the autosuspend triggers just before going out from
> the probe when this change is applied?

Nothing, as pm_runtime is enabled as the last step in probe.

> 
> > Also remove the redundant pm_runtime_put_sync() call from the cleanup
> > path, since the core is not incrementing the usage count beforehand.
> 
> This is interesting. Have anybody actually tried to see refcount WARN about this?
> 
> > This simplifies the PM setup and avoids manipulating the usage counter
> > unnecessarily.
> 
> > Fixes: 31c24c1e93c3 ("iio: imu: inv_icm42600: add core of new inv_icm42600 driver")
> > Signed-off-by: Sean Nyekjaer <sean@...nix.com>
> 
> This should be the first, or close to the beginning of the series, patch.

Ok, but help me understand why?

> 
> --
> With Best Regards,
> Andy Shevchenko
> 
> 

Thanks for the review :)

/Sean


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ