No description
Find a file
Filipe Manana 221ab6a9e6 btrfs: fix log context list corruption after rename whiteout error
commit 236ebc20d9 upstream.

During a rename whiteout, if btrfs_whiteout_for_rename() returns an error
we can end up returning from btrfs_rename() with the log context object
still in the root's log context list - this happens if 'sync_log' was
set to true before we called btrfs_whiteout_for_rename() and it is
dangerous because we end up with a corrupt linked list (root->log_ctxs)
as the log context object was allocated on the stack.

After btrfs_rename() returns, any task that is running btrfs_sync_log()
concurrently can end up crashing because that linked list is traversed by
btrfs_sync_log() (through btrfs_remove_all_log_ctxs()). That results in
the same issue that commit e6c617102c ("Btrfs: fix log context list
corruption after rename exchange operation") fixed.

Fixes: d4682ba03e ("Btrfs: sync log after logging new name")
CC: stable@vger.kernel.org # 4.19+
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-25 08:06:12 +01:00
arch riscv: avoid the PIC offset of static percpu data in module beyond 2G limits 2020-03-25 08:06:07 +01:00
block block, bfq: fix overwrite of bfq_group pointer in bfq_find_set_group() 2020-03-25 08:06:08 +01:00
certs export.h: remove VMLINUX_SYMBOL() and VMLINUX_SYMBOL_STR() 2018-08-22 23:21:44 +09:00
crypto crypto: api - Fix race condition in crypto_spawn_alg 2020-02-11 04:34:05 -08:00
Documentation driver core: Remove device link creation limitation 2020-03-20 11:55:58 +01:00
drivers xhci: Do not open code __print_symbolic() in xhci trace events 2020-03-25 08:06:12 +01:00
firmware Fix built-in early-load Intel microcode alignment 2020-01-23 08:21:29 +01:00
fs btrfs: fix log context list corruption after rename whiteout error 2020-03-25 08:06:12 +01:00
include driver core: Remove device link creation limitation 2020-03-20 11:55:58 +01:00
init fork: fix some -Wmissing-prototypes warnings 2019-12-05 09:21:04 +01:00
ipc Revert "ipc,sem: remove uneeded sem_undo_list lock usage in exit_sem()" 2020-02-28 16:38:49 +01:00
kernel signal: avoid double atomic counter increments for user accounting 2020-03-20 11:55:53 +01:00
lib lib/stackdepot.c: fix global out-of-bounds in stack_slabs 2020-02-28 16:38:55 +01:00
LICENSES LICENSES: Remove CC-BY-SA-4.0 license text 2018-10-18 11:28:50 +02:00
mm mm: slub: add missing TID bump in kmem_cache_alloc_bulk() 2020-03-20 11:55:59 +01:00
net ipv4: ensure rcu_read_lock() in cipso_v4_error() 2020-03-20 11:56:00 +01:00
samples samples/bpf: Don't try to remove user's homedir on clean 2020-02-11 04:34:05 -08:00
scripts parse-maintainers: Mark as executable 2020-03-25 08:06:08 +01:00
security selinux: ensure we cleanup the internal AVC counters on error in avc_update() 2020-02-24 08:34:43 +01:00
sound ALSA: pcm: oss: Remove WARNING from snd_pcm_plug_alloc() checks 2020-03-25 08:06:10 +01:00
tools perf bench futex-wake: Restore thread count default to online CPU count 2020-03-18 07:14:24 +01:00
usr kbuild: clean compressed initramfs image 2019-10-07 18:57:16 +02:00
virt KVM: Check for a bad hva before dropping into the ghc slow path 2020-03-05 16:42:21 +01:00
.clang-format clang-format: Set IndentWrappedFunctionNames false 2018-08-01 18:38:51 +02:00
.cocciconfig
.get_maintainer.ignore
.gitattributes .gitattributes: set git diff driver for C source code files 2016-10-07 18:46:30 -07:00
.gitignore Kbuild updates for v4.17 (2nd) 2018-04-15 17:21:30 -07:00
.mailmap libnvdimm-for-4.19_misc 2018-08-25 18:13:10 -07:00
COPYING COPYING: use the new text with points to the license files 2018-03-23 12:41:45 -06:00
CREDITS 9p: remove Ron Minnich from MAINTAINERS 2018-08-17 16:20:26 -07:00
Kbuild Kbuild updates for v4.15 2017-11-17 17:45:29 -08:00
Kconfig kconfig: move the "Executable file formats" menu to fs/Kconfig.binfmt 2018-08-02 08:06:55 +09:00
MAINTAINERS MAINTAINERS: Update drm/i915 bug filing URL 2020-02-28 16:38:49 +01:00
Makefile Linux 4.19.112 2020-03-20 11:56:00 +01:00
README Docs: Added a pointer to the formatted docs to README 2018-03-21 09:02:53 -06:00

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.