Kernel Tree For Xiaomi 11 Lite NE 5G
Go to file
Jakob Koschel 04f4a1aa94 scsi: lpfc: Avoid usage of list iterator variable after loop
[ Upstream commit 2850b23e9f9ae3696e472d2883ea1b43aafa884e ]

If the &epd_pool->list is empty when executing
lpfc_get_io_buf_from_expedite_pool() the function would return an invalid
pointer. Even in the case if the list is guaranteed to be populated, the
iterator variable should not be used after the loop to be more robust for
future changes.

Linus proposed to avoid any use of the list iterator variable after the
loop, in the attempt to move the list iterator variable declaration into
the macro to avoid any potential misuse after the loop [1].

Link: https://lore.kernel.org/all/CAHk-=wgRr_D8CB-D9Kg-c=EHreAsk5SqXPwr9Y7k9sA6cWXJ6w@mail.gmail.com/ [1]
Signed-off-by: Jakob Koschel <jkl820.git@gmail.com>
Link: https://lore.kernel.org/r/20230301-scsi-lpfc-avoid-list-iterator-after-loop-v1-1-325578ae7561@gmail.com
Reviewed-by: Justin Tee <justin.tee@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-04-05 11:16:39 +02:00
arch m68k: Only force 030 bus error if PC not in exception table 2023-04-05 11:16:39 +02:00
block blk-iocost: fix divide by 0 error in calc_lcoefs() 2023-03-11 16:43:54 +01:00
certs
crypto crypto: rsa-pkcs1pad - Use akcipher_request_complete 2023-03-11 16:43:41 +01:00
Documentation docs: Correct missing "d_" prefix for dentry_operations member d_weak_revalidate 2023-03-22 13:28:03 +01:00
drivers scsi: lpfc: Avoid usage of list iterator variable after loop 2023-04-05 11:16:39 +02:00
fs ext4: fix possible double unlock when moving a directory 2023-03-22 13:28:08 +01:00
include nvme-tcp: fix nvme_tcp_term_pdu to match spec 2023-04-05 11:16:38 +02:00
init
ipc
kernel bpf: Adjust insufficient default bpf_jit_limit 2023-04-05 11:16:37 +02:00
lib
LICENSES
mm mm/thp: check and bail out if page in deferred queue already 2023-03-11 16:44:05 +01:00
net erspan: do not use skb_mac_header() in ndo_start_xmit() 2023-04-05 11:16:38 +02:00
samples
scripts
security keys: Do not cache key in task struct if key is requested from kernel thread 2023-04-05 11:16:37 +02:00
sound ALSA: hda: Match only Intel devices with CONTROLLER_IN_GPU() 2023-03-22 13:28:04 +01:00
tools selftests/bpf: check that modifier resolves after pointer 2023-04-05 11:16:39 +02:00
usr
virt KVM: Destroy target device if coalesced MMIO unregistration fails 2023-03-11 16:44:01 +01:00
.clang-format clang-format: Update with the latest for_each macro list 2019-08-31 10:00:51 +02:00
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore Modules updates for v5.4 2019-09-22 10:34:46 -07:00
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile Linux 5.4.239 2023-03-30 15:04:27 +02:00
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.