WSL2-Linux-Kernel/drivers/misc
Alexander Usyskin 84bb0ac6c8 mei: avoid iterator usage outside of list_for_each_entry
commit c10187b1c5 upstream.

Usage of the iterator outside of the list_for_each_entry
is considered harmful. https://lkml.org/lkml/2022/2/17/1032

Do not reference the loop variable outside of the loop,
by rearranging the orders of execution.
Instead of performing search loop and checking outside the loop
if the end of the list was hit and no matching element was found,
the execution is performed inside the loop upon a successful match
followed by a goto statement to the next step,
therefore no condition has to be performed after the loop has ended.

Cc: <stable@vger.kernel.org>
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Link: https://lore.kernel.org/r/20220308095926.300412-1-tomas.winkler@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-08 14:22:49 +02:00
..
altera-stapl
bcm-vk misc: bcm-vk: fix tty registration race 2021-09-21 16:17:15 +02:00
c2port
cardreader misc: rtsx: Avoid mangling IRQ during runtime PM 2021-12-14 10:57:22 +01:00
cb710 cb710: avoid NULL pointer subtraction 2021-10-05 15:50:05 +02:00
cxl
echo
eeprom eeprom: ee1004: limit i2c reads to I2C_SMBUS_BLOCK_MAX 2022-02-16 12:56:33 +01:00
genwqe misc: genwqe: Fixes DMA mask setting 2021-09-14 10:45:41 +02:00
habanalabs habanalabs: skip read fw errors if dynamic descriptor invalid 2022-01-27 11:05:04 +01:00
ibmasm
lis3lv02d platform/x86: hp_accel: Remove _INI method call 2021-08-26 15:09:18 +02:00
lkdtm lkdtm: Fix content of section containing lkdtm_rodata_do_nothing() 2022-01-27 11:02:57 +01:00
mei mei: avoid iterator usage outside of list_for_each_entry 2022-04-08 14:22:49 +02:00
ocxl
pvpanic misc/pvpanic: fix set driver data 2021-08-27 16:22:26 +02:00
sgi-gru
sgi-xp
ti-st
uacce
vmw_vmci VMCI: fix NULL pointer dereference when unmapping queue pair 2021-08-27 16:21:59 +02:00
Kconfig misc: HI6421V600_IRQ should depend on HAS_IOMEM 2021-10-05 16:07:56 +02:00
Makefile IIO / Staging driver update for 5.15-rc1 2021-09-01 09:45:57 -07:00
ad525x_dpot-i2c.c
ad525x_dpot-spi.c
ad525x_dpot.c
ad525x_dpot.h
apds990x.c
apds9802als.c
atmel-ssc.c
bh1770glc.c
cs5535-mfgpt.c
ds1682.c
dummy-irq.c
dw-xdata-pcie.c
enclosure.c
fastrpc.c misc: fastrpc: avoid double fput() on failed usercopy 2022-02-16 12:56:24 +01:00
gehc-achc.c misc: gehc: Add SPI ID table 2021-10-05 15:47:18 +02:00
hi6421v600-irq.c
hisi_hikey_usb.c
hmc6352.c
hpilo.c
hpilo.h
ibmvmc.c
ibmvmc.h
ics932s401.c
isl29003.c
isl29020.c
kgdbts.c
lattice-ecp3-config.c misc: lattice-ecp3-config: Fix task hung when firmware load failed 2022-01-27 11:04:17 +01:00
pch_phub.c
pci_endpoint_test.c pci-v5.15-changes 2021-09-07 19:13:42 -07:00
phantom.c
qcom-coincell.c
sram-exec.c
sram.c
sram.h
tifm_7xx1.c
tifm_core.c
tsl2550.c
vmw_balloon.c
xilinx_sdfec.c