No description
Find a file
Sagi Grimberg 9e45e8676d nvmet: fix ns enable/disable possible hang
[ Upstream commit f97914e35f ]

When disabling an nvmet namespace, there is a period where the
subsys->lock is released, as the ns disable waits for backend IO to
complete, and the ns percpu ref to be properly killed. The original
intent was to avoid taking the subsystem lock for a prolong period as
other processes may need to acquire it (for example new incoming
connections).

However, it opens up a window where another process may come in and
enable the ns, (re)intiailizing the ns percpu_ref, causing the disable
sequence to hang.

Solve this by taking the global nvmet_config_sem over the entire configfs
enable/disable sequence.

Fixes: a07b4970f4 ("nvmet: add a generic NVMe target")
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-06-12 11:39:47 +02:00
arch riscv: stacktrace: fixed walk_stackframe() 2024-06-12 11:39:42 +02:00
block blk-cgroup: Properly propagate the iostat update up the hierarchy 2024-06-12 11:39:37 +02:00
certs
crypto
Documentation
drivers nvmet: fix ns enable/disable possible hang 2024-06-12 11:39:47 +02:00
fs cifs: Fix missing set of remote_i_size 2024-06-12 11:39:44 +02:00
include kasan, fortify: properly rename memintrinsics 2024-06-12 11:39:44 +02:00
init
io_uring
ipc
kernel dma-mapping: benchmark: handle NUMA_NO_NODE correctly 2024-06-12 11:39:46 +02:00
lib ubsan: Restore dependency on ARCH_HAS_UBSAN 2024-06-12 11:39:38 +02:00
LICENSES
mm
net netfilter: nft_payload: restore vlan q-in-q match support 2024-06-12 11:39:45 +02:00
rust
samples
scripts
security
sound ASoC: tas2781: Fix wrong loading calibrated data sequence 2024-06-12 11:39:39 +02:00
tools selftests: net: lib: set 'i' as local 2024-06-12 11:39:45 +02:00
usr
virt
.clang-format
.cocciconfig
.editorconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
.rustfmt.toml
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile
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 reStructuredText 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.