No description
Find a file
Yang Yingliang 6282a76f71 mmc: mmci: fix return value check of mmc_add_host()
[ Upstream commit b38a20f29a ]

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().

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

Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20221109133539.3275664-1-yangyingliang@huawei.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-01-18 11:30:16 +01:00
arch MIPS: BCM63xx: Add check for NULL for clk in clk_enable 2023-01-18 11:30:08 +01:00
block block: unhash blkdev part inode when the part is deleted 2023-01-18 11:29:59 +01:00
certs
crypto
Documentation spi: Update reference to struct spi_controller 2023-01-18 11:30:10 +01:00
drivers mmc: mmci: fix return value check of mmc_add_host() 2023-01-18 11:30:16 +01:00
firmware
fs NFSv4.x: Fail client initialisation if state manager thread can't run 2023-01-18 11:30:15 +01:00
include ALSA: seq: fix undefined behavior in bit shift for SNDRV_SEQ_FILTER_USE_EVENT 2023-01-18 11:30:12 +01:00
init
ipc ipc/sem: Fix dangling sem_array access in semtimedop race 2022-12-08 11:18:35 +01:00
kernel relay: fix type mismatch when allocating memory in relay_create_buf() 2023-01-18 11:30:08 +01:00
lib lib/notifier-error-inject: fix error when writing -errno to debugfs file 2023-01-18 11:30:06 +01:00
LICENSES
mm mm/khugepaged: invoke MMU notifiers in shmem/file collapse paths 2023-01-18 11:29:59 +01:00
net SUNRPC: Fix missing release socket in rpc_sockname() 2023-01-18 11:30:15 +01:00
samples
scripts scripts/faddr2line: Fix regression in name resolution on ppc64le 2022-12-08 11:18:32 +01:00
security ima: Fix misuse of dereference of pointer in template_desc_init_fields() 2023-01-18 11:30:11 +01:00
sound ALSA: mts64: fix possible null-ptr-defer in snd_mts64_interrupt 2023-01-18 11:30:15 +01:00
tools proc: fixup uptime selftest 2023-01-18 11:30:05 +01:00
usr
virt
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile Linux 4.19.269 2022-12-14 11:28:31 +01:00
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.
See Documentation/00-INDEX for a list of what is contained in each file.

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.