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: <6931f3fbae919_1e0210062@dwillia2-mobl4.notmuch>
Date: Thu, 4 Dec 2025 12:50:03 -0800
From: <dan.j.williams@...el.com>
To: "Cheatham, Benjamin" <benjamin.cheatham@....com>, Dan Williams
	<dan.j.williams@...el.com>, <dave.jiang@...el.com>
CC: <linux-cxl@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
	<Smita.KoralahalliChannabasappa@....com>, <alison.schofield@...el.com>,
	<terry.bowman@....com>, <alejandro.lucero-palau@....com>,
	<linux-pci@...r.kernel.org>, <Jonathan.Cameron@...wei.com>, Alejandro Lucero
	<alucerop@....com>
Subject: Re: [PATCH 4/6] cxl/mem: Convert devm_cxl_add_memdev() to
 scope-based-cleanup

Cheatham, Benjamin wrote:
[..]
> > -	rc = devm_add_action_or_reset(host, cxl_memdev_unregister, cxlmd);
> > +	rc = devm_add_action_or_reset(host, cxl_memdev_unregister,
> > +				      no_free_ptr(cxlmd));
> >  	if (rc)
> >  		return ERR_PTR(rc);
> >  	return cxlmd;
> 
> Isn't cxlmd zeroed out by no_free_ptr() above? I think what needs to happen here is:
> 
> 	rc = devm_add_action_or_reset(host, cxl_memdev_unregister, cxlmd);
> 	if (rc) {
> 		no_free_ptr(cxlmd);
> 		return ERR_PTR(rc);
> 	}
> 
> 	return_ptr(cxlmd);
> 
> Looking ahead, this gets nullified in patch 6/6 so I guess it's only an issue if
> someone is in the middle of a bisect (or doesn't pick up patch 6/6 for some reason).

Good catch! ...and no, I should not leave that bisect problem in the set.

Will pull the cxl_memdev_autoremove() change forward for that.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ