Re: [PATCH next] cxl: fix return value in cxlctl_validate_set_features()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, May 28, 2025 at 08:22:35AM -0700, Alison Schofield wrote:
> On Wed, May 28, 2025 at 11:11:41AM +0300, Dan Carpenter wrote:
> > The cxlctl_validate_set_features() function is type bool.  It's supposed
> > to return true for valid requests and false for invalid.  However, this
> > error path returns ERR_PTR(-EINVAL) which is true when it was intended to
> > return false.
> 
> Shiju - Can you trace this one through and add the impact statement?
> Wondering if this is going to fail gracefully, or badly, further 
> down this path?
> 

Sorry, I would normally analyse this a bit more myself, but it's only in
linux-next so I assumed no one was using it yet.  It ends up being fine.

cxlctl_set_feature() has a check for:

	if (rpc_in->op_size <= sizeof(feat_in->hdr))

at the start and sizeof(feat_in->hdr) is larger than sizeof(uuid_t).

regards,
dan carpenter





[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux