The source for the Linux kernel used in Windows Subsystem for Linux 2 (WSL2)
Перейти к файлу
Yang Yingliang e0cfe7aa41 mmc: meson-gx: fix return value check of mmc_add_host()
[ Upstream commit 90935f16f2 ]

mmc_add_host() may return error, if we ignore its return value,
it will lead two issues:
1. The memory that allocated in mmc_alloc_host() is leaked.
2. In the remove() path, mmc_remove_host() will be called to
   delete device, but it's not added yet, it will lead a kernel
   crash because of null-ptr-deref in device_del().

Fix this by checking the return value and goto error path which
will call mmc_free_host().

Fixes: 51c5d8447b ("MMC: meson: initial support for GX platforms")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20221108123417.479045-1-yangyingliang@huawei.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-12-31 13:14:17 +01:00
Documentation ASoC: dt-bindings: wcd9335: fix reset line polarity in example 2022-12-31 13:14:13 +01:00
LICENSES LICENSES/dual/CC-BY-4.0: Git rid of "smart quotes" 2021-07-15 06:31:24 -06:00
arch riscv, bpf: Emit fixed-length instructions for BPF_PSEUDO_FUNC 2022-12-31 13:14:16 +01:00
block block: clear ->slave_dir when dropping the main slave_dir reference 2022-12-31 13:14:10 +01:00
certs certs/blacklist_hashes.c: fix const confusion in certs blacklist 2022-06-22 14:22:01 +02:00
crypto crypto: akcipher - default implementation for setting a private key 2022-10-26 12:35:25 +02:00
drivers mmc: meson-gx: fix return value check of mmc_add_host() 2022-12-31 13:14:17 +01:00
fs NFSv4.x: Fail client initialisation if state manager thread can't run 2022-12-31 13:14:16 +01:00
include bpf, sockmap: Fix missing BPF_F_INGRESS flag when using apply_bytes 2022-12-31 13:14:14 +01:00
init init/Kconfig: fix CC_HAS_ASM_GOTO_TIED_OUTPUT test with dash 2022-12-02 17:41:08 +01:00
io_uring io_uring: Fix a null-ptr-deref in io_tctx_exit_cb() 2022-12-14 11:37:31 +01:00
ipc ipc/sem: Fix dangling sem_array access in semtimedop race 2022-12-08 11:28:45 +01:00
kernel bpf: propagate precision across all frames, not just the last one 2022-12-31 13:14:09 +01:00
lib lib/notifier-error-inject: fix error when writing -errno to debugfs file 2022-12-31 13:14:03 +01:00
mm mm/gup: fix gup_pud_range() for dax 2022-12-14 11:37:20 +01:00
net SUNRPC: Fix missing release socket in rpc_sockname() 2022-12-31 13:14:16 +01:00
samples samples/landlock: Format with clang-format 2022-06-09 10:23:23 +02:00
scripts scripts/faddr2line: Fix regression in name resolution on ppc64le 2022-12-08 11:28:38 +01:00
security ima: Fix misuse of dereference of pointer in template_desc_init_fields() 2022-12-31 13:14:10 +01:00
sound ALSA: mts64: fix possible null-ptr-defer in snd_mts64_interrupt 2022-12-31 13:14:16 +01:00
tools netfilter: conntrack: set icmpv6 redirects as RELATED 2022-12-31 13:14:14 +01:00
usr usr/include/Makefile: add linux/nfc.h to the compile-test coverage 2022-02-01 17:27:15 +01:00
virt kvm: Add support for arch compat vm ioctls 2022-10-29 10:12:54 +02:00
.clang-format clang-format: Update with the latest for_each macro list 2021-05-12 23:32:39 +02:00
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore .gitignore: ignore only top-level modules.builtin 2021-05-02 00:43:35 +09:00
.mailmap mailmap: add Andrej Shadura 2021-10-18 20:22:03 -10:00
COPYING
CREDITS MAINTAINERS: Move Daniel Drake to credits 2021-09-21 08:34:58 +03:00
Kbuild
Kconfig
MAINTAINERS futex: Move to kernel/futex/ 2022-12-31 13:14:04 +01:00
Makefile Linux 5.15.85 2022-12-21 17:36:38 +01: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.