]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit - fs/dcache.c
locking/barriers: Convert users of lockless_dereference() to READ_ONCE()
authorWill Deacon <will.deacon@arm.com>
Tue, 24 Oct 2017 10:22:48 +0000 (11:22 +0100)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Sat, 6 Jan 2018 12:23:07 +0000 (13:23 +0100)
commit7252704bfd83e951d00ec75526ed2bf64a7f6ee1
treec80e572e9ce77f67005ca111b1e47803a0e6f0f5
parent6ef3d843f8f1a8b72ca83d4b1d457c2896278ccd
locking/barriers: Convert users of lockless_dereference() to READ_ONCE()

CVE-2017-5754

[ Note, this is a Git cherry-pick of the following commit:

    506458efaf15 ("locking/barriers: Convert users of lockless_dereference() to READ_ONCE()")

  ... for easier x86 PTI code testing and back-porting. ]

READ_ONCE() now has an implicit smp_read_barrier_depends() call, so it
can be used instead of lockless_dereference() without any change in
semantics.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1508840570-22169-4-git-send-email-will.deacon@arm.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
(cherry picked from commit 3382290ed2d5e275429cef510ab21889d3ccd164)
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
13 files changed:
arch/x86/events/core.c
arch/x86/include/asm/mmu_context.h
arch/x86/kernel/ldt.c
drivers/md/dm-mpath.c
fs/dcache.c
fs/overlayfs/ovl_entry.h
fs/overlayfs/readdir.c
include/linux/rculist.h
include/linux/rcupdate.h
kernel/events/core.c
kernel/seccomp.c
kernel/task_work.c
mm/slab.h