Skip to content
Commit c7e3548c authored by Dan Carpenter's avatar Dan Carpenter Committed by Dan Williams
Browse files

cxl/region: prevent underflow in ways_to_cxl()



The "ways" variable comes from the user.  The ways_to_cxl() function
has an upper bound but it doesn't check for negatives.  Make
the "ways" variable an unsigned int to fix this bug.

Fixes: 80d10a6c ("cxl/region: Add interleave geometry attributes")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/Yueo3NV2hFCXx1iV@kili


[djbw: fixup interleave_ways_store() to only accept unsigned input]
Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
parent 88ab1dde
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment