blatt A1
Go to file
Riyan Dhiman 64cf2a3920 block: fix potential invalid pointer dereference in blk_add_partition
[ Upstream commit 26e197b7f9240a4ac301dd0ad520c0c697c2ea7d ]

The blk_add_partition() function initially used a single if-condition
(IS_ERR(part)) to check for errors when adding a partition. This was
modified to handle the specific case of -ENXIO separately, allowing the
function to proceed without logging the error in this case. However,
this change unintentionally left a path where md_autodetect_dev()
could be called without confirming that part is a valid pointer.

This commit separates the error handling logic by splitting the
initial if-condition, improving code readability and handling specific
error scenarios explicitly. The function now distinguishes the general
error case from -ENXIO without altering the existing behavior of
md_autodetect_dev() calls.

Fixes: b72053072c (block: allow partitions on host aware zone devices)
Signed-off-by: Riyan Dhiman <riyandhiman14@gmail.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20240911132954.5874-1-riyandhiman14@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-10-17 15:20:45 +02:00
arch x86/sgx: Fix deadlock in SGX NUMA node search 2024-10-17 15:20:40 +02:00
block block: fix potential invalid pointer dereference in blk_add_partition 2024-10-17 15:20:45 +02:00
certs
crypto crypto: xor - fix template benchmarking 2024-10-17 15:20:36 +02:00
Documentation hwspinlock: Introduce hwspin_lock_bust() 2024-09-08 07:53:09 +02:00
drivers nbd: fix race between timeout and normal completion 2024-10-17 15:20:44 +02:00
fs mount: handle OOM on mnt_warn_timestamp_expiry 2024-10-17 15:20:37 +02:00
include Bluetooth: hci_core: Fix sending MGMT_EV_CONNECT_FAILED 2024-10-17 15:20:42 +02:00
init rust: fix the default format for CONFIG_{RUSTC,BINDGEN}_VERSION_TEXT 2024-08-29 17:30:32 +02:00
io_uring io_uring/sqpoll: Do not set PF_NO_SETAFFINITY on sqpoll threads 2024-09-12 11:10:26 +02:00
ipc sysctl: treewide: drop unused argument ctl_table_root::set_ownership(table) 2024-08-11 12:35:51 +02:00
kernel padata: Honor the caller's alignment in case of chunk_size 0 2024-10-17 15:20:38 +02:00
lib lib/generic-radix-tree.c: Fix rare race in __genradix_ptr_alloc() 2024-09-12 11:10:25 +02:00
LICENSES
mm mm: avoid leaving partial pfn mappings around in error case 2024-09-18 19:23:04 +02:00
net ipv6: avoid possible NULL deref in rt6_uncached_list_flush_dev() 2024-10-17 15:20:44 +02:00
rust rust: kbuild: fix export of bss symbols 2024-09-12 11:10:21 +02:00
samples bpf: Replace bpf_lpm_trie_key 0-length array with flexible array 2024-08-29 17:30:22 +02:00
scripts scripts: kconfig: merge_config: config files: add a trailing newline 2024-09-18 19:23:03 +02:00
security smack: unix sockets: fix accept()ed socket label 2024-09-12 11:10:19 +02:00
sound ASoC: tda7419: fix module autoloading 2024-09-30 16:23:49 +02:00
tools kselftest/arm64: Actually test SME vector length changes via sigreturn 2024-10-17 15:20:39 +02:00
usr
virt KVM: Fix a data race on last_boosted_vcpu in kvm_vcpu_on_spin() 2024-06-27 13:46:21 +02:00
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes .gitattributes: use 'dts' diff driver for dts files 2019-12-04 19:44:11 -08:00
.gitignore
.mailmap 9 hotfixes. 6 for MM, 3 for other areas. Four of these patches address 2022-12-10 17:10:52 -08:00
.rustfmt.toml rust: add .rustfmt.toml 2022-09-28 09:02:20 +02:00
COPYING
CREDITS MAINTAINERS: Remove Michal Marek from Kbuild maintainers 2022-11-16 14:53:00 +09:00
Kbuild Kbuild updates for v6.1 2022-10-10 12:00:45 -07:00
Kconfig kbuild: ensure full rebuild when the compiler is updated 2020-05-12 13:28:33 +09:00
MAINTAINERS MAINTAINERS: add leah to 6.1 MAINTAINERS file 2024-05-17 11:56:16 +02:00
Makefile Linux 6.1.112 2024-09-30 16:23:56 +02:00
README Drop all 00-INDEX files from Documentation/ 2018-09-09 15:08:58 -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 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.