linux/drivers
Gregory Herrero cfddf4af22 i40e: validate ring_len parameter against hardware-specific values
[ Upstream commit 6994283421 ]

The maximum number of descriptors supported by the hardware is
hardware-dependent and can be retrieved using
i40e_get_max_num_descriptors(). Move this function to a shared header
and use it when checking for valid ring_len parameter rather than using
hardcoded value.

By fixing an over-acceptance issue, behavior change could be seen where
ring_len could now be rejected while configuring rx and tx queues if its
size is larger than the hardware-dependent maximum number of
descriptors.

Fixes: 55d225670d ("i40e: add validation for ring_len param")
Signed-off-by: Gregory Herrero <gregory.herrero@oracle.com>
Tested-by: Rafal Romanowski <rafal.romanowski@intel.com>
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2026-01-19 13:09:55 +01:00
..
accessibility speakup: Fix sizeof() vs ARRAY_SIZE() bug 2024-06-16 13:39:11 +02:00
acpi ACPI: CPPC: Fix missing PCC check for guaranteed_perf 2026-01-19 13:09:45 +01:00
amba amba: tegra-ahb: Fix device leak on SMMU enable 2026-01-19 13:09:54 +01:00
android binder: remove "invalid inc weak" check 2025-10-29 14:03:12 +01:00
ata ata: libata-scsi: Fix system suspend for a security locked drive 2025-12-07 06:09:33 +09:00
atm atm/fore200e: Fix possible data race in fore200e_open() 2025-12-07 06:09:34 +09:00
auxdisplay auxdisplay: charlcd: Partially revert "Move hwidth and bwidth to struct hd44780_common" 2025-06-04 14:37:57 +02:00
base PM: runtime: Do not clear needs_force_resume with enabled runtime PM 2026-01-19 13:09:53 +01:00
bcma Driver core update for 5.15-rc1 2021-09-01 08:44:42 -07:00
block floppy: fix for PAGE_SIZE != 4KB 2026-01-19 13:09:49 +01:00
bluetooth Bluetooth: btusb: Add new VID/PID 13d3/3533 for RTL8821CE 2026-01-19 13:09:42 +01:00
bus ti-sysc: allow OMAP2 and OMAP4 timers to be reserved on AM33xx 2026-01-19 13:09:47 +01:00
cdrom scsi: sr: cdrom: Move cdrom_read_cdda_bpc() into the sr driver 2021-07-30 22:13:09 -04:00
char char: applicom: fix NULL pointer dereference in ac_ioctl 2026-01-19 13:09:51 +01:00
clk clk: mvebu: cp110 add CLK_IGNORE_UNUSED to pcie_x10, pcie_x11 & pcie_x4 2026-01-19 13:09:47 +01:00
clocksource clocksource/drivers/vf-pit: Replace raw_readl/writel to readl/writel 2025-12-07 06:09:17 +09:00
comedi comedi: check device's attached status in compat ioctls 2026-01-19 13:09:22 +01:00
connector net/connector: Add const qualifier to cb_id 2020-12-16 11:06:49 -08:00
counter counter: microchip-tcb-capture: Fix undefined counter channel state on probe 2025-04-10 14:31:56 +02:00
cpufreq cpufreq: nforce2: fix reference count leak in nforce2 2026-01-19 13:09:51 +01:00
cpuidle cpuidle: Fail cpuidle device registration if there is one already 2025-12-07 06:09:17 +09:00
crypto crypto: ccree - Correctly handle return of sg_nents_for_len 2026-01-19 13:09:32 +01:00
cxl cxl/mem: Fix shutdown order 2023-11-20 11:08:27 +01:00
dax dax/kmem: Pass valid argument to memory_group_register_static 2023-07-23 13:47:17 +02:00
dca dca: Use PTR_ERR_OR_ZERO() to simplify code 2020-05-15 16:25:20 +02:00
devfreq PM / devfreq: governor: Replace sscanf() with kstrtoul() in set_freq_store() 2025-08-28 16:24:17 +02:00
dio drivers: dio: fix possible memory leak in dio_init() 2022-12-31 13:14:27 +01:00
dma dmaengine: dw-edma: Set status for callback_result 2025-12-07 06:09:20 +09:00
dma-buf dma-buf: insert memory barrier before updating num_fences 2025-09-09 18:50:23 +02:00
edac EDAC/altera: Use INTTEST register for Ethernet and USB SBE injection 2025-12-07 06:09:30 +09:00
eisa EISA: use DEVICE_ATTR_RO() helper macro 2021-06-04 15:28:34 +02:00
extcon extcon: adc-jack: Cleanup wakeup source only if it was enabled 2025-12-07 06:09:26 +09:00
firewire firewire: nosy: ensure user_length is taken into account when fetching packet contents 2024-05-17 11:51:01 +02:00
firmware firmware: imx: scu-irq: Init workqueue before request mbox channel 2026-01-19 13:09:46 +01:00
fpga fpga: zynq_fpga: Fix the wrong usage of dma_map_sgtable() 2025-08-28 16:24:34 +02:00
fsi fsi: aspeed: Reset master errors after CFAM reset 2023-09-19 12:22:46 +02:00
gnss treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
gpio gpio: wcd934x: mark the GPIO controller as sleeping 2025-10-19 16:21:43 +02:00
gpu drm/amd/display: Use GFP_ATOMIC in dc_create_plane_state() 2026-01-19 13:09:54 +01:00
greybus greybus: Fix use-after-free bug in gb_interface_release due to race condition. 2024-07-05 09:14:23 +02:00
hid HID: input: map HID_GD_Z to ABS_DISTANCE for stylus/pen 2026-01-19 13:09:45 +01:00
hsi HSI: ssi_protocol: Fix use after free vulnerability in ssi_protocol Driver Due to Race Condition 2025-05-02 07:44:06 +02:00
hv Drivers: hv: vmbus: Add utility function for querying ring size 2025-07-10 15:57:36 +02:00
hwmon hwmon: (w83l786ng) Convert macros to functions to avoid TOCTOU 2026-01-19 13:09:55 +01:00
hwspinlock hwspinlock: Introduce hwspin_lock_bust() 2024-09-12 11:07:41 +02:00
hwtracing intel_th: Fix error handling in intel_th_output_open 2026-01-19 13:09:51 +01:00
i2c i2c: amd-mp2: fix reference leak in MP2 PCI device 2026-01-19 13:09:54 +01:00
i3c i3c: master: svc: Prevent incomplete IBI transaction 2026-01-19 13:09:25 +01:00
idle intel_idle: Allow loading ACPI tables for any family 2025-08-28 16:24:16 +02:00
iio iio: imu: st_lsm6dsx: Fix measurement unit for odr struct member 2026-01-19 13:09:23 +01:00
infiniband RDMA/irdma: Fix data race in irdma_free_pble 2026-01-19 13:09:33 +01:00
input Input: i8042 - add TUXEDO InfinityBook Max Gen10 AMD to i8042 quirk table 2026-01-19 13:09:45 +01:00
interconnect interconnect: qcom: sc7280: Add missing num_links to xm_pcie3_1 node 2025-08-28 16:24:03 +02:00
iommu iommu/arm-smmu-qcom: Enable use of all SMR groups when running bare-metal 2026-01-19 13:09:33 +01:00
ipack ipack: ipoctal: fix module reference leak 2021-09-27 17:38:49 +02:00
irqchip irqchip/qcom-irq-combiner: Fix section mismatch 2026-01-19 13:09:22 +01:00
isdn isdn: mISDN: hfcsusb: fix memory leak in hfcsusb_probe() 2025-12-07 06:09:30 +09:00
leds leds: netxbig: Fix GPIO descriptor leak in error paths 2026-01-19 13:09:29 +01:00
macintosh macintosh/mac_hid: fix race condition in mac_hid_toggle_emumouse 2026-01-19 13:09:28 +01:00
mailbox mailbox: mailbox-test: Fix debugfs_create_dir error checking 2025-12-07 06:09:34 +09:00
mcb mcb: fix a double free bug in chameleon_parse_gdd() 2025-05-02 07:44:31 +02:00
md dm log-writes: Add missing set_freezable() for freezable kthread 2026-01-19 13:09:39 +01:00
media media: vidtv: initialize local pointers upon transfer of memory ownership 2026-01-19 13:09:52 +01:00
memory memory: samsung: exynos-srom: Fix of_iomap leak in exynos_srom_probe 2025-10-19 16:21:47 +02:00
memstick memstick: Add timeout to prevent indefinite waiting 2025-12-07 06:09:16 +09:00
message scsi: fusion: Remove unused variable 'rc' 2024-12-14 19:51:02 +01:00
mfd mfd: mt6358-irq: Fix missing irq_domain_remove() in error path 2026-01-19 13:09:31 +01:00
misc mei: me: add wildcat lake P DID 2025-10-29 14:03:12 +01:00
mmc mmc: sdhci-msm: Avoid early clock doubling during HS400 transition 2026-01-19 13:09:48 +01:00
most most: usb: fix double free on late probe failure 2025-12-07 06:09:35 +09:00
mtd mtd: lpddr_cmds: fix signed shifts in lpddr_cmds 2026-01-19 13:09:36 +01:00
mux mux: gpio: Simplify code by using dev_err_probe() 2021-04-02 16:28:53 +02:00
net i40e: validate ring_len parameter against hardware-specific values 2026-01-19 13:09:55 +01:00
nfc nfc: pn533: Fix error code in pn533_acr122_poweron_rdr() 2026-01-19 13:09:44 +01:00
ntb ntb: reduce stack usage in idt_scan_mws 2025-05-02 07:44:36 +02:00
nubus nubus: Partially revert proc_create_single_data() conversion 2023-07-05 18:25:05 +01:00
nvdimm libnvdimm/labels: Fix divide error in nd_label_data_init() 2025-06-04 14:37:55 +02:00
nvme nvme-fc: don't hold rport lock when putting ctrl 2026-01-19 13:09:48 +01:00
nvmem nvmem: core: improve range check for nvmem_cell_write() 2025-03-13 12:50:32 +01:00
of of: module: add buffer overflow check in of_modalias() 2025-05-09 09:39:41 +02:00
opp OPP: debugfs: Fix warning around icc_get_name() 2024-03-26 18:21:23 -04:00
parisc parisc: Do not reprogram affinitiy on ASP chip 2026-01-19 13:09:52 +01:00
parport parport_pc: add support for ASIX AX99100 2025-03-13 12:50:46 +01:00
pci PCI: dwc: Fix wrong PORT_LOGIC_LTSSM_STATE_MASK definition 2026-01-19 13:09:32 +01:00
pcmcia pcmcia: omap_cf: Mark driver struct with __refdata to prevent section mismatch 2025-10-02 13:39:05 +02:00
perf perf: arm_spe: Prevent overflow in PERF_IDX2OFF() 2025-10-19 16:21:29 +02:00
phy phy: broadcom: bcm63xx-usbh: fix section mismatches 2026-01-19 13:09:50 +01:00
pinctrl pinctrl: single: Fix incorrect type for error return variable 2026-01-19 13:09:36 +01:00
platform platform/chrome: cros_ec_ishtp: Fix UAF after unbinding driver 2026-01-19 13:09:52 +01:00
pnp PNP: ACPI: fix fortify warning 2024-02-23 08:54:38 +01:00
power power: supply: apm_power: only unset own apm_get_power_status 2026-01-19 13:09:25 +01:00
powercap powercap: intel_rapl: Do not change CLAMPING bit if ENABLE bit cannot be changed 2025-08-28 16:24:03 +02:00
pps pps: fix warning in pps_register_cdev when register device fail 2025-10-19 16:21:33 +02:00
ps3 powerpc/ps3: Warn on PS3 device errors 2021-06-10 21:44:58 +10:00
ptp ptp: Limit time setting of PTP clocks 2025-12-07 06:09:20 +09:00
pwm pwm: bcm2835: Make sure the channel is enabled after pwm_request() 2026-01-19 13:09:31 +01:00
rapidio drivers/rapidio/rio_cm.c: prevent possible heap overwrite 2025-06-27 11:05:33 +01:00
ras RAS/CEC: Correct ce_add_elem()'s returned values 2021-04-07 11:52:26 +02:00
regulator regulator: core: Protect regulator_supply_alias_list with regulator_list_mutex 2026-01-19 13:09:35 +01:00
remoteproc remoteproc: qcom_q6v5_wcss: fix parsing of qcom,halt-regs 2026-01-19 13:09:36 +01:00
reset reset: brcmstb: Enable reset drivers for ARCH_BCM2835 2025-08-28 16:24:18 +02:00
rpmsg rpmsg: glink: fix rpmsg device leak 2026-01-19 13:09:54 +01:00
rtc rtc: rx8025: fix incorrect register reference 2025-12-07 06:09:26 +09:00
s390 s390/ap: Don't leak debug feature files if AP instructions are not available 2026-01-19 13:09:24 +01:00
sbus module: remove never implemented MODULE_SUPPORTED_DEVICE 2021-03-17 13:16:18 -07:00
scsi scsi: aic94xx: fix use-after-free in device removal path 2026-01-19 13:09:51 +01:00
sh sh: clk: Fix clk_enable() to return 0 on NULL clk 2025-01-09 13:28:34 +01:00
siox siox: fix possible memory leak in siox_device_add() 2022-11-26 09:24:36 +01:00
slimbus slimbus: ngd: Fix reference count leak in qcom_slim_ngd_notify_slaves 2025-12-07 06:09:35 +09:00
soc soc: amlogic: canvas: fix device leak on lookup 2026-01-19 13:09:54 +01:00
soundwire soundwire: stream: restore params when prepare ports fail 2025-08-28 16:24:10 +02:00
spi spi: fsl-cpm: Check length parity before switching to 16 bit mode 2026-01-19 13:09:46 +01:00
spmi spmi: hisi-spmi-controller: Do not override device identifier 2024-07-05 09:14:20 +02:00
ssb ssb: Fix division by zero issue in ssb_calc_clock_rate 2024-09-04 13:23:20 +02:00
staging staging: fbtft: core: fix potential memory leak in fbtft_probe_common() 2026-01-19 13:09:32 +01:00
target scsi: target: Reset t_task_cdb pointer in error case 2026-01-19 13:09:51 +01:00
tc The main MIPS changes for 5.6: 2020-01-31 11:28:31 -08:00
tee tee: allow a driver to allocate a tee_device without a pool 2025-12-07 06:09:17 +09:00
thermal thermal/drivers/qcom/lmh: Add missing IRQ includes 2025-10-19 16:21:31 +02:00
thunderbolt thunderbolt: Add support for Intel Wildcat Lake 2025-12-07 06:09:35 +09:00
tty serial: sprd: Return -EPROBE_DEFER when uart clock is not ready 2026-01-19 13:09:48 +01:00
uio uio: uio_fsl_elbc_gpcm:: Add null pointer check to uio_fsl_elbc_gpcm_probe 2026-01-19 13:09:23 +01:00
usb usb: renesas_usbhs: Fix a resource leak in usbhs_pipe_malloc() 2026-01-19 13:09:51 +01:00
vdpa vdpa: Sync calls set/get config/status with cf_mutex 2026-01-19 13:09:34 +01:00
vfio vfio/type1: Fix error unwind in migration dirty bitmap allocation 2025-06-27 11:05:13 +01:00
vhost vhost/vsock: improve RCU read sections around vhost_vsock_get() 2026-01-19 13:09:48 +01:00
video fbdev: ssd1307fb: fix potential page leak in ssd1307fb_probe() 2026-01-19 13:09:36 +01:00
virt minmax: add in_range() macro 2025-10-19 16:21:28 +02:00
virtio virtio_vdpa: fix misleading return in void function 2026-01-19 13:09:35 +01:00
visorbus visorbus: fix error return code in visorchipset_init() 2021-06-04 15:27:26 +02:00
vlynq bus: Make remove callback return void 2021-07-21 11:53:42 +02:00
vme vme: Fix error not catched in fake_init() 2022-12-31 13:14:30 +01:00
w1 w1: fix loop in w1_fini() 2023-07-23 13:47:20 +02:00
watchdog via_wdt: fix critical boot hang due to unnamed resource allocation 2026-01-19 13:09:47 +01:00
xen xen/events: Update virq_to_irq on migration 2025-10-19 16:21:55 +02:00
zorro zorro: Drop useless (and hardly used) .driver member in struct zorro_dev 2021-08-05 14:37:04 +02:00
Kconfig firmware: include drivers/firmware/Kconfig unconditionally 2021-10-07 16:51:26 +02:00
Makefile virtio: always enter drivers/virtio/ 2021-12-22 09:32:39 +01:00