No description
  • C 98.2%
  • Assembly 1%
  • Makefile 0.3%
  • Shell 0.2%
  • Python 0.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Zhu Wang e12fac07f6 scsi: core: Fix possible memory leak if device_add() fails
commit 04b5b5cb0136ce970333a9c6cec7e46adba1ea3a upstream.

If device_add() returns error, the name allocated by dev_set_name() needs
be freed. As the comment of device_add() says, put_device() should be used
to decrease the reference count in the error path. So fix this by calling
put_device(), then the name can be freed in kobject_cleanp().

Fixes: ee959b00c3 ("SCSI: convert struct class_device to struct device")
Signed-off-by: Zhu Wang <wangzhu9@huawei.com>
Link: https://lore.kernel.org/r/20230803020230.226903-1-wangzhu9@huawei.com
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-08-16 18:19:25 +02:00
arch x86: Move gds_ucode_mitigated() declaration to header 2023-08-16 18:19:23 +02:00
block
certs
crypto
Documentation
drivers scsi: core: Fix possible memory leak if device_add() fails 2023-08-16 18:19:25 +02:00
fs btrfs: set cache_block_group_error if we find an error 2023-08-16 18:19:24 +02:00
include netfilter: nf_tables: report use refcount overflow 2023-08-16 18:19:24 +02:00
init
ipc
kernel
lib test_firmware: return ENOMEM instead of ENOSPC on failed memory allocation 2023-08-11 11:54:00 +02:00
LICENSES
mm
net netfilter: nf_tables: report use refcount overflow 2023-08-16 18:19:24 +02:00
samples
scripts
security
sound
tools selftests/rseq: Fix build with undefined __weak 2023-08-16 18:19:23 +02:00
usr
virt
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile Linux 5.4.253 2023-08-11 11:54:02 +02: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.

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.