linux/drivers/misc/mei
Alexander Usyskin c10187b1c5 mei: avoid iterator usage outside of list_for_each_entry
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-03-18 13:48:30 +01:00
..
hdcp
pxp
bus-fixup.c
bus.c mei: bus: add client dma interface 2021-11-26 18:31:46 +02:00
client.c mei: me: avoid link reset on shutdown 2022-02-25 12:14:01 +01:00
client.h
debugfs.c
dma-ring.c
hbm.c mei: hbm: fix client dma reply status 2021-12-30 14:12:16 +01:00
hbm.h
hw-me-regs.h mei: me: add Alder Lake N device id. 2022-03-18 13:48:16 +01:00
hw-me.c mei: me: fix reset policy on read error in interrupt 2022-02-25 12:14:01 +01:00
hw-me.h
hw-txe-regs.h
hw-txe.c mei: Remove some dead code 2021-12-03 14:26:33 +01:00
hw-txe.h
hw.h mei: bus: add client dma interface 2021-11-26 18:31:46 +02:00
init.c mei: do not overwrite state on hw start 2022-02-25 12:14:01 +01:00
interrupt.c mei: avoid iterator usage outside of list_for_each_entry 2022-03-18 13:48:30 +01:00
Kconfig
main.c
Makefile
mei_dev.h
mei-trace.c
mei-trace.h
pci-me.c mei: me: add Alder Lake N device id. 2022-03-18 13:48:16 +01:00
pci-txe.c