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
Filipe Manana 93c5b8decc btrfs: reinitialize delayed ref list after deleting it from the list
commit c9a75ec45f1111ef530ab186c2a7684d0a0c9245 upstream.

At insert_delayed_ref() if we need to update the action of an existing
ref to BTRFS_DROP_DELAYED_REF, we delete the ref from its ref head's
ref_add_list using list_del(), which leaves the ref's add_list member
not reinitialized, as list_del() sets the next and prev members of the
list to LIST_POISON1 and LIST_POISON2, respectively.

If later we end up calling drop_delayed_ref() against the ref, which can
happen during merging or when destroying delayed refs due to a transaction
abort, we can trigger a crash since at drop_delayed_ref() we call
list_empty() against the ref's add_list, which returns false since
the list was not reinitialized after the list_del() and as a consequence
we call list_del() again at drop_delayed_ref(). This results in an
invalid list access since the next and prev members are set to poison
pointers, resulting in a splat if CONFIG_LIST_HARDENED and
CONFIG_DEBUG_LIST are set or invalid poison pointer dereferences
otherwise.

So fix this by deleting from the list with list_del_init() instead.

Fixes: 1d57ee9416 ("btrfs: improve delayed refs iterations")
CC: stable@vger.kernel.org # 4.19+
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-17 14:58:51 +01:00
arch ARM: dts: rockchip: Fix the realtek audio codec on rk3036-kylin 2024-11-17 14:58:50 +01:00
block blk-rq-qos: fix crash on rq_qos_wait vs. rq_qos_wake_function race 2024-11-08 16:20:48 +01:00
certs
crypto crypto: aead,cipher - zeroize key buffer after use 2024-11-08 16:20:33 +01:00
Documentation dt-bindings: gpu: Convert Samsung Image Rotator to dt-schema 2024-11-08 16:20:52 +01:00
drivers dm-unstriped: cast an operand to sector_t to prevent potential uint32_t overflow 2024-11-17 14:58:51 +01:00
fs btrfs: reinitialize delayed ref list after deleting it from the list 2024-11-17 14:58:51 +01:00
include mac80211: Add support to trigger sta disconnect on hardware restart 2024-11-08 16:20:52 +01:00
init init: open /initrd.image with O_LARGEFILE 2024-04-13 12:51:36 +02:00
ipc ipc: replace costly bailout check in sysvipc_find_ipc() 2024-09-04 13:15:02 +02:00
kernel bpf: Fix out-of-bounds write in trie_get_next_key() 2024-11-08 16:20:52 +01:00
lib debugobjects: Fix conditions in fill_pool() 2024-11-08 16:20:34 +01:00
LICENSES
mm mm: krealloc: Fix MTE false alarm in __do_krealloc 2024-11-08 16:20:54 +01:00
net sctp: properly validate chunk size in sctp_sf_ootb() 2024-11-17 14:58:50 +01:00
samples
scripts scripts: kconfig: merge_config: config files: add a trailing newline 2024-11-08 16:20:24 +01:00
security security/keys: fix slab-out-of-bounds in key_task_permission 2024-11-17 14:58:50 +01:00
sound ALSA: firewire-lib: fix return value on fail in amdtp_tscm_init() 2024-11-17 14:58:50 +01:00
tools usbip: tools: Fix detach_port() invalid port error path 2024-11-08 16:20:53 +01:00
usr
virt KVM: Fix a data race on last_boosted_vcpu in kvm_vcpu_on_spin() 2024-11-08 16:20:47 +01:00
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore Remove *.orig pattern from .gitignore 2024-11-08 16:20:33 +01:00
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile Linux 5.4.285 2024-11-08 16:20:54 +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.