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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1256440269.161759726504643.JavaMail.epsvc@epcpadp1new>
Date: Mon, 29 Sep 2025 19:32:25 +0530
From: Neeraj Kumar <s.neeraj@...sung.com>
To: Dave Jiang <dave.jiang@...el.com>
Cc: linux-cxl@...r.kernel.org, nvdimm@...ts.linux.dev,
	linux-kernel@...r.kernel.org, gost.dev@...sung.com,
	a.manzanares@...sung.com, vishak.g@...sung.com, neeraj.kernel@...il.com,
	cpgs@...sung.com
Subject: Re: [PATCH V3 20/20] cxl/pmem: Add CXL LSA 2.1 support in cxl pmem

On 24/09/25 01:47PM, Dave Jiang wrote:
>
>> +++ b/drivers/cxl/core/pmem_region.c
>> @@ -290,3 +290,56 @@ int devm_cxl_add_pmem_region(struct cxl_region *cxlr)
>>  	return rc;
>>  }
>>  EXPORT_SYMBOL_NS_GPL(devm_cxl_add_pmem_region, "CXL");
>> +
>> +static int match_free_ep_decoder(struct device *dev, const void *data)
>> +{
>> +	struct cxl_decoder *cxld = to_cxl_decoder(dev);
>
>I think this is needed if the function is match_free_ep_decoder().
>
>if (!is_endpoint_decoder(dev))
>	return 0;
>

Yes this check is required, I will add this.

>> +
>> +	return !cxld->region;
>> +}
>
>May want to borrow some code from match_free_decoder() in core/region.c. I think the decoder commit order matters?
>

Yes Dave, Looking at [1], seems commit order matters. Sure I will look
at match_free_decoder() in core/region.c
[1] https://lore.kernel.org/all/172964783668.81806.14962699553881333486.stgit@dwillia2-xfh.jf.intel.com/


>> +
>> +static struct cxl_decoder *cxl_find_free_ep_decoder(struct cxl_port *port)
>> +{
>> +	struct device *dev;
>> +
>> +	dev = device_find_child(&port->dev, NULL, match_free_ep_decoder);
>> +	if (!dev)
>> +		return NULL;
>> +
>> +	/* Release device ref taken via device_find_child() */
>> +	put_device(dev);
>
>Should have the caller put the device.

Its like taking device ref temporarly and releasing it then and there
after finding proper root decoder. I believe, releasing device ref
from caller would make it look little out of context.


Regards,
Neeraj


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ