kernel_optimize_test/drivers/misc/mei
Alexander Usyskin 7b478cb67b mei: avoid iterator usage outside of list_for_each_entry
commit c10187b1c5ebb8681ca467ab7b0ded5ea415d258 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:39:49 +02:00
..
hdcp
bus-fixup.c mei: bus: unconditionally enable clients with vtag support 2020-08-18 15:44:44 +02:00
bus.c mei: bus: use zero vtag for bus clients. 2020-08-18 15:44:44 +02:00
client.c mei: handle tx queue flushing for vtag connections 2020-08-18 15:44:44 +02:00
client.h mei: protect mei_cl_mtu from null dereference 2020-11-03 10:13:48 +01:00
debugfs.c
dma-ring.c
hbm.c mei: hbm: call mei_set_devstate() on hbm stop response 2021-03-04 11:38:12 +01:00
hbm.h
hw-me-regs.h mei: me: add Alder Lake N device id. 2022-04-08 14:39:49 +02:00
hw-me.c
hw-me.h
hw-txe-regs.h
hw-txe.c
hw-txe.h
hw.h mei: hw: Replace zero-length array with flexible-array member 2020-10-30 16:57:41 -05:00
init.c
interrupt.c mei: avoid iterator usage outside of list_for_each_entry 2022-04-08 14:39:49 +02:00
Kconfig Revert "mei: virtio: virtualization frontend driver" 2020-12-06 10:36:17 +01:00
main.c mei: add connect with vtag ioctl 2020-08-18 15:44:44 +02:00
Makefile Revert "mei: virtio: virtualization frontend driver" 2020-12-06 10:36:17 +01:00
mei_dev.h mei: add a vtag map for each client 2020-08-18 15:44:44 +02:00
mei-trace.c
mei-trace.h
pci-me.c mei: me: add Alder Lake N device id. 2022-04-08 14:39:49 +02:00
pci-txe.c