No description
Find a file
Zhihao Cheng 510b80abe8 ubifs: dirty_cow_znode: Fix memleak in error handling path
[ Upstream commit 122deabfe1 ]

Following process will cause a memleak for copied up znode:

dirty_cow_znode
  zn = copy_znode(c, znode);
  err = insert_old_idx(c, zbr->lnum, zbr->offs);
  if (unlikely(err))
     return ERR_PTR(err);   // No one refers to zn.

Fix it by adding copied znode back to tnc, then it will be freed
by ubifs_destroy_tnc_subtree() while closing tnc.

Fetch a reproducer in [Link].

Link: https://bugzilla.kernel.org/show_bug.cgi?id=216705
Fixes: 1e51764a3c ("UBIFS: add new flash file system")
Signed-off-by: Zhihao Cheng <chengzhihao1@huawei.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-03-11 16:44:10 +01:00
arch um: vector: Fix memory leak in vector_config 2023-03-11 16:44:08 +01:00
block blk-iocost: fix divide by 0 error in calc_lcoefs() 2023-03-11 16:43:54 +01:00
certs certs/blacklist_hashes.c: fix const confusion in certs blacklist 2022-06-22 14:11:22 +02:00
crypto crypto: rsa-pkcs1pad - Use akcipher_request_complete 2023-03-11 16:43:41 +01:00
Documentation mm: memcontrol: deprecate charge moving 2023-03-11 16:44:05 +01:00
drivers ubi: Fix possible null-ptr-deref in ubi_free_volume() 2023-03-11 16:44:10 +01:00
fs ubifs: dirty_cow_znode: Fix memleak in error handling path 2023-03-11 16:44:10 +01:00
include ima: Align ima_file_mmap() parameters with mmap_file LSM hook 2023-03-11 16:44:02 +01:00
init init/Kconfig: fix CC_HAS_ASM_GOTO_TIED_OUTPUT test with dash 2022-12-08 11:22:59 +01:00
ipc ipc/sem: Fix dangling sem_array access in semtimedop race 2022-12-08 11:23:06 +01:00
kernel irqdomain: Drop bogus fwspec-mapping error handling 2023-03-11 16:44:03 +01:00
lib lib/mpi: Fix buffer overrun when SG is too long 2023-03-11 16:43:38 +01:00
LICENSES
mm mm/thp: check and bail out if page in deferred queue already 2023-03-11 16:44:05 +01:00
net net/sched: Retire tcindex classifier 2023-03-11 16:44:07 +01:00
samples samples: vfio-mdev: Fix missing pci_disable_device() in mdpy_fb_probe() 2023-01-18 11:41:26 +01:00
scripts ftrace/scripts: Update the instructions for ftrace-bisect.sh 2023-02-06 07:52:44 +01:00
security ima: Align ima_file_mmap() parameters with mmap_file LSM hook 2023-03-11 16:44:02 +01:00
sound ALSA: hda/realtek: Add quirk for HP EliteDesk 800 G6 Tower PC 2023-03-11 16:44:03 +01:00
tools ktest.pl: Add RUN_TIMEOUT option with default unlimited 2023-03-11 16:44:05 +01:00
usr initramfs: restore default compression behavior 2020-04-08 09:08:38 +02:00
virt KVM: Destroy target device if coalesced MMIO unregistration fails 2023-03-11 16:44:01 +01:00
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS net/phy/mdio-i2c: Move header file to include/linux/mdio 2023-02-06 07:52:46 +01:00
Makefile kbuild: Port silent mode detection to future gnu make. 2023-03-11 16:44:07 +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.

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.