No description
Find a file
Viacheslav Dubeyko b828b4bf29 ceph: fix variable dereferenced before check in ceph_umount_begin()
smatch warnings:
fs/ceph/super.c:1042 ceph_umount_begin() warn: variable dereferenced before check 'fsc' (see line 1041)

vim +/fsc +1042 fs/ceph/super.c

void ceph_umount_begin(struct super_block *sb)
{
	struct ceph_fs_client *fsc = ceph_sb_to_fs_client(sb);

	doutc(fsc->client, "starting forced umount\n");
              ^^^^^^^^^^^
Dereferenced

	if (!fsc)
            ^^^^
Checked too late.

		return;
	fsc->mount_state = CEPH_MOUNT_SHUTDOWN;
	__ceph_umount_begin(fsc);
}

The VFS guarantees that the superblock is still
alive when it calls into ceph via ->umount_begin().
Finally, we don't need to check the fsc and
it should be valid. This patch simply removes
the fsc check.

Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/r/202503280852.YDB3pxUY-lkp@intel.com/
Signed-off-by: Viacheslav Dubeyko <Slava.Dubeyko@ibm.com>
Reviewed by: Alex Markuze <amarkuze@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2025-06-06 11:08:59 +02:00
arch soc: fixes for 6.13, part 3 2025-05-23 08:04:13 -07:00
block SCSI fixes on 20250516 2025-05-16 10:28:22 -07:00
certs sign-file,extract-cert: use pkcs11 provider for OPENSSL MAJOR >= 3 2024-09-20 19:52:48 +03:00
crypto crypto: algif_hash - fix double free in hash_accept 2025-05-19 13:44:16 +08:00
Documentation This is somewhat larger than what I hoped for, with a few PRs from 2025-05-22 09:15:19 -07:00
drivers Input updates for v6.15-rc7 2025-05-24 18:54:18 -07:00
fs ceph: fix variable dereferenced before check in ceph_umount_begin() 2025-06-06 11:08:59 +02:00
include Disable FOP_DONTCACHE for now due to bugs 2025-05-25 15:43:36 -07:00
init init: remove unused CONFIG_CC_CAN_LINK_STATIC 2025-05-12 15:03:46 +09:00
io_uring io_uring/net: only retry recv bundle for a full transfer 2025-05-21 19:24:18 -06:00
ipc treewide: const qualify ctl_tables where applicable 2025-01-28 13:48:37 +01:00
kernel 22 hotfixes. 13 are cc:stable and the remainder address post-6.14 issues 2025-05-25 07:48:35 -07:00
lib alloc_tag: allocate percpu counters for module tags dynamically 2025-05-25 00:53:48 -07:00
LICENSES LICENSES: add 0BSD license text 2024-09-01 20:43:24 -07:00
mm 22 hotfixes. 13 are cc:stable and the remainder address post-6.14 issues 2025-05-25 07:48:35 -07:00
net ipsec-2025-05-21 2025-05-22 11:49:53 +02:00
rust rust: clean Rust 1.88.0's clippy::uninlined_format_args lint 2025-05-07 00:11:47 +02:00
samples tracing: samples: Initialize trace_array_printk() with the correct function 2025-05-12 13:07:22 -04:00
scripts kbuild: fix typos "module.builtin" to "modules.builtin" 2025-05-12 15:04:52 +09:00
security landlock: Improve bit operations in audit code 2025-05-12 11:38:53 +02:00
sound ALSA: hda/realtek - Add new HP ZBook laptop with micmute led fixup 2025-05-20 16:09:06 +02:00
tools selftests/tc-testing: Add an HFSC qlen accounting test 2025-05-22 11:16:51 +02:00
usr usr/include: openrisc: don't HDRTEST bpf_perf_event.h 2025-05-12 15:03:17 +09:00
virt ARM: 2025-04-08 13:47:55 -07:00
.clang-format clang-format: Update the ForEachMacros list for v6.15-rc1 2025-04-13 11:03:59 +02:00
.clippy.toml rust: clean Rust 1.88.0's warning about clippy::disallowed_macros configuration 2025-05-07 00:11:47 +02:00
.cocciconfig
.editorconfig .editorconfig: remove trim_trailing_whitespace option 2024-06-13 16:47:52 +02:00
.get_maintainer.ignore MAINTAINERS: Retire Ralf Baechle 2024-11-12 15:48:59 +01:00
.gitattributes .gitattributes: set diff driver for Rust source code files 2023-05-31 17:48:25 +02:00
.gitignore kbuild: Create intermediate vmlinux build with relocations preserved 2025-03-17 00:29:50 +09:00
.mailmap 22 hotfixes. 13 are cc:stable and the remainder address post-6.14 issues 2025-05-25 07:48:35 -07:00
.rustfmt.toml
COPYING
CREDITS MAINTAINERS: update SLAB ALLOCATOR maintainers 2025-04-17 20:10:06 -07:00
Kbuild drm: ensure drm headers are self-contained and pass kernel-doc 2025-02-12 10:44:43 +02:00
Kconfig io_uring: Rename KConfig to Kconfig 2025-02-19 14:53:27 -07:00
MAINTAINERS 22 hotfixes. 13 are cc:stable and the remainder address post-6.14 issues 2025-05-25 07:48:35 -07:00
Makefile Linux 6.15 2025-05-25 16:09:23 -07:00
README README: Fix spelling 2024-03-18 03:36:32 -06:00

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.