Go to file
Prashanth K e20a23b342 usb: gadget: u_serial: Avoid spinlock recursion in __gs_console_push
[ Upstream commit e599046994 ]

When serial console over USB is enabled, gs_console_connect
queues gs_console_work, where it acquires the spinlock and
queues the usb request, and this request goes to gadget layer.
Now consider a situation where gadget layer prints something
to dmesg, this will eventually call gs_console_write() which
requires cons->lock. And this causes spinlock recursion. Avoid
this by excluding usb_ep_queue from the spinlock.

 spin_lock_irqsave //needs cons->lock
 gs_console_write
	.
	.
 _printk
 __warn_printk
 dev_warn/pr_err
	.
	.
 [USB Gadget Layer]
	.
	.
 usb_ep_queue
 gs_console_work
 __gs_console_push // acquires cons->lock
 process_one_work

Signed-off-by: Prashanth K <quic_prashk@quicinc.com>
Link: https://lore.kernel.org/r/1683638872-6885-1-git-send-email-quic_prashk@quicinc.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-08-23 17:32:30 +02:00
Documentation iommu/amd: Introduce Disable IRTE Caching Support 2023-08-23 17:32:27 +02:00
LICENSES
arch Revert "[PATCH] uml: export symbols added by GCC hardened" 2023-08-23 17:32:29 +02:00
block blk-mq: Fix stall due to recursive flush plug 2023-08-03 10:25:41 +02:00
certs
crypto crypto: jitter - correct health test during initialization 2023-07-19 16:36:19 +02:00
drivers usb: gadget: u_serial: Avoid spinlock recursion in __gs_console_push 2023-08-23 17:32:30 +02:00
fs cifs: fix session state check in reconnect to avoid use-after-free issue 2023-08-23 17:32:29 +02:00
include media: v4l2-mem2mem: add lock to protect parameter num_rdy 2023-08-23 17:32:30 +02:00
init init, x86: Move mem_encrypt_init() into arch_cpu_finalize_init() 2023-08-08 20:04:49 +02:00
io_uring io_uring: correct check for O_TMPFILE 2023-08-16 18:32:19 +02:00
ipc
kernel dma-remap: use kvmalloc_array/kvfree for larger dma memory remap 2023-08-23 17:32:27 +02:00
lib debugobjects: Recheck debug_objects_enabled before reporting 2023-08-11 12:14:25 +02:00
mm mm: memory-failure: avoid false hwpoison page mapped error info 2023-08-16 18:32:20 +02:00
net nexthop: Fix infinite nexthop bucket dump when using maximum nexthop ID 2023-08-16 18:32:28 +02:00
rust rust: allocator: Prevent mis-aligned allocation 2023-08-11 12:14:18 +02:00
samples samples: ftrace: Save required argument registers in sample trampolines 2023-07-23 13:54:09 +02:00
scripts kbuild: rust: avoid creating temporary files 2023-07-27 08:57:06 +02:00
security security: keys: Modify mismatched function name 2023-07-27 08:56:59 +02:00
sound ASoC: SOF: core: Free the firmware trace before calling snd_sof_shutdown() 2023-08-23 17:32:29 +02:00
tools nexthop: Fix infinite nexthop bucket dump when using maximum nexthop ID 2023-08-16 18:32:28 +02:00
usr
virt KVM: Grab a reference to KVM for VM and vCPU stats file descriptors 2023-08-03 10:26:01 +02:00
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap mailmap: add entries for Ben Dooks 2023-06-19 13:19:35 -07:00
.rustfmt.toml
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS Networking fixes for 6.4-rc8, including fixes from ipsec, bpf, 2023-06-22 17:59:51 -07:00
Makefile Linux 6.4.11 2023-08-16 18:32:31 +02:00
README

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.