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 56428d89a0 scsi: snic: Fix double free in snic_tgt_create()
commit 1bd3a76880b2bce017987cf53780b372cf59528e upstream.

Commit 41320b18a0e0 ("scsi: snic: Fix possible memory leak if device_add()
fails") fixed the memory leak caused by dev_set_name() when device_add()
failed. However, it did not consider that 'tgt' has already been released
when put_device(&tgt->dev) is called. Remove kfree(tgt) in the error path
to avoid double free of 'tgt' and move put_device(&tgt->dev) after the
removed kfree(tgt) to avoid a use-after-free.

Fixes: 41320b18a0e0 ("scsi: snic: Fix possible memory leak if device_add() fails")
Signed-off-by: Zhu Wang <wangzhu9@huawei.com>
Link: https://lore.kernel.org/r/20230819083941.164365-1-wangzhu9@huawei.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-08-30 16:27:27 +02:00
arch x86/fpu: Set X86_FEATURE_OSXSAVE feature after enabling OSXSAVE in CR4 2023-08-30 16:27:26 +02:00
block
certs
crypto
Documentation Documentation/sysctl: document page_lock_unfairness 2023-08-30 16:27:27 +02:00
drivers scsi: snic: Fix double free in snic_tgt_create() 2023-08-30 16:27:27 +02:00
fs nfsd: Fix race to FREE_STATEID and cl_revoked 2023-08-30 16:27:25 +02:00
include mm: allow a controlled amount of unfairness in the page lock 2023-08-30 16:27:26 +02:00
init x86/mm: Initialize text poking earlier 2023-08-08 19:56:36 +02:00
ipc
kernel mm: allow a controlled amount of unfairness in the page lock 2023-08-30 16:27:26 +02:00
lib radix tree: remove unused variable 2023-08-30 16:27:26 +02:00
LICENSES
mm mm: allow a controlled amount of unfairness in the page lock 2023-08-30 16:27:26 +02:00
net rtnetlink: Reject negative ifindexes in RTM_NEWLINK 2023-08-30 16:27:26 +02:00
samples
scripts
security IMA: allow/fix UML builds 2023-08-30 16:27:11 +02:00
sound ALSA: pcm: Check for null pointer of pointer substream before dereferencing it 2023-08-30 16:27:27 +02:00
tools selftests: mirror_gre_changes: Tighten up the TTL test match 2023-08-30 16:27:16 +02:00
usr
virt
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS iio: stx104: Move to addac subdirectory 2023-08-30 16:27:12 +02:00
Makefile Linux 5.4.254 2023-08-16 18:19:25 +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.