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:
 <PN3P287MB1829B0776EF3D34D0CA78CB18BA12@PN3P287MB1829.INDP287.PROD.OUTLOOK.COM>
Date: Thu, 27 Mar 2025 11:02:33 +0000
From: Tarang Raval <tarang.raval@...iconsignals.io>
To: Sakari Ailus <sakari.ailus@...ux.intel.com>
CC: "kieran.bingham@...asonboard.com" <kieran.bingham@...asonboard.com>,
	"Shravan.Chippa@...rochip.com" <Shravan.Chippa@...rochip.com>, Mauro Carvalho
 Chehab <mchehab@...nel.org>, Hans Verkuil <hverkuil@...all.nl>, Laurent
 Pinchart <laurent.pinchart@...asonboard.com>, AngeloGioacchino Del Regno
	<angelogioacchino.delregno@...labora.com>, Julien Massot
	<julien.massot@...labora.com>, Zhi Mao <zhi.mao@...iatek.com>, Mikhail
 Rudenko <mike.rudenko@...il.com>, Benjamin Mugnier
	<benjamin.mugnier@...s.st.com>, Luis Garcia <git@...gi311.com>,
	"linux-media@...r.kernel.org" <linux-media@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 6/6] media: i2c: imx334: Enable runtime PM before
 sub-device registration

Hi Sakari,

Thanks for the review.

> On Mon, Mar 10, 2025 at 12:47:48PM +0530, Tarang Raval wrote:
> > Runtime PM is fully initialized before calling
> > v4l2_async_register_subdev_sensor(). Moving the runtime PM initialization
> > earlier prevents potential access to an uninitialized or powered-down device.
> >
> > Signed-off-by: Tarang Raval <tarang.raval@...iconsignals.io>
> > ---
> >  drivers/media/i2c/imx334.c | 5 +++--
> >  1 file changed, 3 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/media/i2c/imx334.c b/drivers/media/i2c/imx334.c
> > index ffa39bb317f7..8964d60324e2 100644
> > --- a/drivers/media/i2c/imx334.c
> > +++ b/drivers/media/i2c/imx334.c
> > @@ -1295,6 +1295,9 @@ static int imx334_probe(struct i2c_client *client)
> >               goto error_handler_free;
> >       }
> >
> > +     pm_runtime_set_active(imx334->dev);
> > +     pm_runtime_enable(imx334->dev);
> > +
> >       ret = v4l2_async_register_subdev_sensor(&imx334->sd);
> >       if (ret < 0) {
> >               dev_err(imx334->dev,
> > @@ -1302,8 +1305,6 @@ static int imx334_probe(struct i2c_client *client)
> >               goto error_media_entity;
> >       }
> >
> > -     pm_runtime_set_active(imx334->dev);
> > -     pm_runtime_enable(imx334->dev);
> 
> Please also change error handling accordingly.

Oh, I missed that.
  
> Btw. the remove function calls pm_runtime_suspended() that does nothing
> (use pm_runtime_set_suspended() instead). Could you add a patch to fix it?
 
Should I include these changes in this patch, or should I create a separate 
patch for them.

Best Regards,
Tarang
> >       pm_runtime_idle(imx334->dev);
> >
> >       return 0;
> 
> --
> Regards,
> 
> Sakari Ailus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ