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] [day] [month] [year] [list]
Message-ID: <vp4exzgqj6req46c5n722njtehxdmxzbalqgpl4up4sqknk4pi@zcex6okxvesj>
Date: Wed, 17 Dec 2025 12:31:40 +0100
From: Uwe Kleine-König <u.kleine-koenig@...libre.com>
To: Sumit Garg <sumit.garg@...nel.org>
Cc: Jens Wiklander <jens.wiklander@...aro.org>, 
	op-tee@...ts.trustedfirmware.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 02/17] tee: Add probe, remove and shutdown bus
 callbacks to tee_client_driver

Hello Sumit,

On Wed, Dec 17, 2025 at 02:24:55PM +0530, Sumit Garg wrote:
> On Mon, Dec 15, 2025 at 03:16:32PM +0100, Uwe Kleine-König wrote:
> > +static void tee_client_device_shutdown(struct device *dev)
> > +{
> > +	struct tee_client_device *tcdev = to_tee_client_device(dev);
> > +	struct tee_client_driver *drv = to_tee_client_driver(dev->driver);
> > +
> > +	if (dev->driver && drv->shutdown)
> 
> Is check for dev->driver really needed here? I think we only reach this
> stage if a driver is associated to the device. Also, it has been
> dereferenced above too.

Yes, this is needed. See device_shutdown() which calls the bus shutdown
method also for unbound drivers.

And no it has not been dereferenced above, to_tee_client_driver() is
just a subtraction from the literal value, this doesn't count as
dereference.

> Apart from this, rest looks fine to me. Feel free to add:
> 
> Reviewed-by: Sumit Garg <sumit.garg@....qualcomm.com>

Thanks
Uwe

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ