mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-13 07:31:07 +00:00
misc: pci_endpoint_test: Fix array underflow in pci_endpoint_test_ioctl()
[ Upstream commit1ad82f9db1] Commiteefb83790a("misc: pci_endpoint_test: Add doorbell test case") added NO_BAR (-1) to the pci_barno enum which, in practical terms, changes the enum from an unsigned int to a signed int. If the user passes a negative number in pci_endpoint_test_ioctl() then it results in an array underflow in pci_endpoint_test_bar(). Fixes:eefb83790a("misc: pci_endpoint_test: Add doorbell test case") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Signed-off-by: Manivannan Sadhasivam <mani@kernel.org> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Link: https://patch.msgid.link/aIzzZ4vc6ZrmM9rI@suswa Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
77732c58fe
commit
6df3687922
1 changed files with 1 additions and 1 deletions
Loading…
Add table
Add a link
Reference in a new issue