diff options
author | Dan Carpenter <[email protected]> | 2024-09-12 11:49:10 +0300 |
---|---|---|
committer | Alex Williamson <[email protected]> | 2024-09-12 14:15:07 -0600 |
commit | aab439ffa1ca1067c0114773d4044828fab582af (patch) | |
tree | 58f3212ccc43db8bd46160a18e631beaedbbdeb8 /tools/perf/util/scripting-engines/trace-event-python.c | |
parent | 27a8204b26ac009e47e0bcde4cd24ff69d96fccf (diff) |
vfio/pci: clean up a type in vfio_pci_ioctl_pci_hot_reset_groups()
The "array_count" value comes from the copy_from_user() in
vfio_pci_ioctl_pci_hot_reset(). If the user passes a value larger than
INT_MAX then we'll pass a negative value to kcalloc() which triggers an
allocation failure and a stack trace.
It's better to make the type unsigned so that if (array_count > count)
returns -EINVAL instead.
Signed-off-by: Dan Carpenter <[email protected]>
Reviewed-by: Jason Gunthorpe <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Alex Williamson <[email protected]>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-python.c')
0 files changed, 0 insertions, 0 deletions