]> git.ipfire.org Git - thirdparty/linux.git/commit
PCI/IDE: Fix off by one error calculating VF RID range
authorLi Ming <ming.li@zohomail.com>
Wed, 14 Jan 2026 11:14:55 +0000 (19:14 +0800)
committerDan Williams <dan.j.williams@intel.com>
Fri, 23 Jan 2026 01:47:21 +0000 (17:47 -0800)
commit8370af2019dee9ca004ca7c5e36b1f629ecb1e39
tree61f5a002ec71189267f342bfbbac72a054525132
parent731bb3118f859d2a68444a9ae580681522d32bc0
PCI/IDE: Fix off by one error calculating VF RID range

The VF ID range of an SR-IOV device is [0, num_VFs - 1].
pci_ide_stream_alloc() mistakenly uses num_VFs to represent the last ID.
Fix that off by one error to stay in bounds of the range.

Fixes: 1e4d2ff3ae45 ("PCI/IDE: Add IDE establishment helpers")
Signed-off-by: Li Ming <ming.li@zohomail.com>
Reviewed-by: Xu Yilun <yilun.xu@linux.intel.com>
Link: https://patch.msgid.link/20260114111455.550984-1-ming.li@zohomail.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/pci/ide.c
include/linux/pci-ide.h