Kernel sources for Moto G9 (Play) (Guamp)
Find a file
Ming Lei 70249194f9 BACKPORT: blk-mq: clear stale request in tags->rq[] before freeing one request pool
refcount_inc_not_zero() in bt_tags_iter() still may read one freed
request.

Fix the issue by the following approach:

1) hold a per-tags spinlock when reading ->rqs[tag] and calling
refcount_inc_not_zero in bt_tags_iter()

2) clearing stale request referred via ->rqs[tag] before freeing
request pool, the per-tags spinlock is held for clearing stale
->rq[tag]

So after we cleared stale requests, bt_tags_iter() won't observe
freed request any more, also the clearing will wait for pending
request reference.

The idea of clearing ->rqs[] is borrowed from John Garry's previous
patch and one recent David's patch.

Tested-by: John Garry <john.garry@huawei.com>
Reviewed-by: David Jeffery <djeffery@redhat.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Ming Lei <ming.lei@redhat.com>.

Bug: 197804811
Change-Id: If49478d7b05d3f5b0a26966ddf9ae764cf2fb6b0
[Upstream: cherry picked from commit bd63141d585bef14f4caf111f6d0e27fe2300ec6]
[Todd: refactored to avoid breaking KMI ]
Signed-off-by: Pradeep P V K <pragalla@codeaurora.org>
Signed-off-by: Todd Kjos <tkjos@google.com>
Git-commit: bb96e7f45dc6ac1d6ec12190f1f286e3014fb068
Git-repo: https://android.googlesource.com/kernel/common/
Signed-off-by: Pradeep P V K <quic_pragalla@quicinc.com>
(cherry picked from commit 02c9fbde9b)

Change-Id: I58693eddf77156f574a80542f719bd132906f0cc
Signed-off-by: Surapusetty Naresh Babu <snareshb@qti.qualcomm.com>
2023-11-06 02:30:55 -08:00
android
arch defconfig: kona: Fix for SonyDualSenseEdge cts failures 2023-10-13 17:56:18 +05:30
block BACKPORT: blk-mq: clear stale request in tags->rq[] before freeing one request pool 2023-11-06 02:30:55 -08:00
certs
crypto
Documentation BACKPORT: cgroup: make per-cgroup pressure stall tracking configurable 2021-07-01 23:43:00 -07:00
drivers dwc3-msm-core: Remove usage of DWC31_LINK_GDBGLTSSM with POR 2023-10-15 03:30:38 -07:00
firmware
fs exec: Force single empty string when argv is empty 2023-08-16 14:29:08 +05:30
include BACKPORT: bpf: add bpf_ktime_get_boot_ns() 2023-09-22 15:58:40 +05:30
init
ipc
kernel BACKPORT: bpf: add bpf_ktime_get_boot_ns() 2023-09-22 15:58:40 +05:30
lib lib/iov_iter: initialize "flags" in new pipe_buffer 2022-06-19 17:21:12 +05:30
LICENSES
mm BACKPORT: FROMLIST: mm: protect free_pgtables with mmap_lock write lock in exit_mmap 2023-08-11 14:44:57 +05:30
net BACKPORT: bpf: add bpf_ktime_get_boot_ns() 2023-09-22 15:58:40 +05:30
samples
scripts
security UPSTREAM: security: selinux: allow per-file labeling for bpffs 2023-06-16 11:28:04 +05:30
sound From bbfaa7d36c1eb465f120f2a3dfe25c1fe022195d Mon Sep 17 00:00:00 2001 2021-07-06 10:08:25 +05:30
techpack
tools BACKPORT: bpf: add bpf_ktime_get_boot_ns() 2023-09-22 15:58:40 +05:30
usr
virt KVM: arm64: Allow SMCCC_ARCH_WORKAROUND_3 to be discovered and migrated 2022-10-17 04:05:04 -07:00
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
Android.bp Use environment variable to find unifdef tool 2021-06-25 00:24:52 -07:00
AndroidKernel.mk
build.config.aarch64
build.config.allmodconfig
build.config.allmodconfig.aarch64
build.config.allmodconfig.arm
build.config.allmodconfig.x86_64
build.config.arm
build.config.common
build.config.gki
build.config.gki-debug.aarch64
build.config.gki-debug.x86_64
build.config.gki.aarch64
build.config.gki.x86_64
build.config.gki_kasan
build.config.gki_kasan.aarch64
build.config.gki_kasan.x86_64
build.config.goldfish.arm
build.config.goldfish.arm64
build.config.goldfish.mips
build.config.goldfish.mips64
build.config.goldfish.x86
build.config.goldfish.x86_64
build.config.x86_64
COPYING
CREDITS
gen_headers_arm.bp uapi: Add UAPI headers for slatecom_interface driver 2021-09-08 04:43:44 -07:00
gen_headers_arm64.bp uapi: Add UAPI headers for slatecom_interface driver 2021-09-08 04:43:44 -07:00
Kbuild
Kconfig
kernel_headers.py Change the subprocess argument to fix the build issue 2021-06-28 16:47:30 +05:30
MAINTAINERS UPSTREAM: HID: playstation: Initial DualSense USB support 2021-08-06 12:46:40 +05:30
Makefile Makefile: Use Python2 for compilation 2023-05-17 22:39:27 -07:00
README
verity_dev_keys.x509

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.
See Documentation/00-INDEX for a list of what is contained in each file.

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.