summary refs log tree commit diff
path: root/samples/v4l
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2022-08-01 13:20:12 +0300
committerDan Williams <dan.j.williams@intel.com>2022-08-01 12:12:33 -0700
commitc7e3548cac4a8a8bc1ad183cc7c7249463dff55f (patch)
treef288dd095c2354807dfbc116363c376d9baff822 /samples/v4l
parent88ab1dde792aa6a3902e2a30929e00acc99d351a (diff)
downloadlinux-c7e3548cac4a8a8bc1ad183cc7c7249463dff55f.tar.gz
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: 80d10a6cee05 ("cxl/region: Add interleave geometry attributes")
Signed-off-by: Dan 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: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'samples/v4l')
0 files changed, 0 insertions, 0 deletions