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: <13a3fdb675baa36fcda1bb254b05032b1175a2a8.camel@linaro.org>
Date: Tue, 14 Jan 2025 19:56:35 +0000
From: André Draszik <andre.draszik@...aro.org>
To: Bart Van Assche <bvanassche@....org>, Alim Akhtar
 <alim.akhtar@...sung.com>,  Avri Altman <avri.altman@....com>, "James E.J.
 Bottomley" <James.Bottomley@...senPartnership.com>,  "Martin K. Petersen"
 <martin.petersen@...cle.com>, Peter Griffin <peter.griffin@...aro.org>,
 Krzysztof Kozlowski <krzk@...nel.org>, Manivannan Sadhasivam
 <manivannan.sadhasivam@...aro.org>,  Eric Biggers <ebiggers@...nel.org>
Cc: Tudor Ambarus <tudor.ambarus@...aro.org>, Will McVicker
 <willmcvicker@...gle.com>, kernel-team@...roid.com,
 linux-scsi@...r.kernel.org,  linux-kernel@...r.kernel.org,
 linux-samsung-soc@...r.kernel.org,  linux-arm-kernel@...ts.infradead.org,
 linux-arm-msm@...r.kernel.org,  stable@...r.kernel.org
Subject: Re: [PATCH v2] scsi: ufs: fix use-after free in init error and
 remove paths

Hi Bart,

On Tue, 2025-01-14 at 09:55 -0800, Bart Van Assche wrote:
> On 1/14/25 8:16 AM, André Draszik wrote:
> > +/**
> > + * ufshcd_scsi_host_put_callback - deallocate underlying Scsi_Host and
> > + *				   thereby the Host Bus Adapter (HBA)
> > + * @host: pointer to SCSI host
> > + */
> > +static void ufshcd_scsi_host_put_callback(void *host)
> > +{
> > +	scsi_host_put(host);
> > +}
> 
> Please rename ufshcd_scsi_host_put_callback() such that the function 
> name makes clear when this function is called instead of what the 
> function does.

Would you have a suggestion for such a name? Something like
ufshcd_driver_release_action()?

Unless I'm misunderstanding you, I believe most drivers use
a function name that says what the function does, e.g.
dell_wmi_ddv_debugfs_remove (just as a completely random
example out of many).

If going by when it is called and if applying this principle
throughout ufshcd, then there can only ever be one such
function in ufshcd, as all devm_add_action() callback actions
happen at driver release, which surely isn't what you mean.

You probably meant something different?

Cheers,
Andre'


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ