Go to file
Herbert Xu 4c00a51e9b rhashtable: Fix unprotected RCU dereference in __rht_ptr
[ Upstream commit 1748f6a2cbc4694523f16da1c892b59861045b9d ]

The rcu_dereference call in rht_ptr_rcu is completely bogus because
we've already dereferenced the value in __rht_ptr and operated on it.
This causes potential double readings which could be fatal.  The RCU
dereference must occur prior to the comparison in __rht_ptr.

This patch changes the order of RCU dereference so that it is done
first and the result is then fed to __rht_ptr.  The RCU marking
changes have been minimised using casts which will be removed in
a follow-up patch.

Fixes: ba6306e3f648 ("rhashtable: Remove RCU marking from...")
Reported-by: "Gong, Sishuai" <sishuai@purdue.edu>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-03-16 16:32:52 +08:00
Documentation doc: dt: bindings: usb: dwc3: Update entries for disabling SS instances in park mode 2021-03-16 16:31:55 +08:00
LICENSES Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
arch sh: Fix validation of system call number 2021-03-16 16:32:50 +08:00
block block: fix get_max_segment_size() overflow on 32bit arch 2021-03-16 16:32:16 +08:00
certs Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
crypto keys: asymmetric: fix error return code in software_key_query() 2021-03-16 16:32:01 +08:00
drivers net: lan78xx: fix transfer-buffer memory leak 2021-03-16 16:32:52 +08:00
fs Revert "cifs: Fix the target file was deleted when rename failed." 2021-03-16 16:32:35 +08:00
include rhashtable: Fix unprotected RCU dereference in __rht_ptr 2021-03-16 16:32:52 +08:00
init x86: Fix early boot crash on gcc-10, third try 2021-03-16 16:28:02 +08:00
ipc ipc/util.c: sysvipc_find_ipc() incorrectly updates position index 2021-03-16 16:27:51 +08:00
kernel uprobes: Change handle_swbp() to send SIGTRAP with si_code=SI_KERNEL, to fix GDB regression 2021-03-16 16:32:22 +08:00
lib test_objagg: Fix potential memory leak in error handling 2021-03-16 16:31:04 +08:00
mm mm/filemap.c: don't bother dropping mmap_sem for zero size readahead 2021-03-16 16:32:44 +08:00
net xfrm: policy: match with both mark and mask on user interfaces 2021-03-16 16:32:49 +08:00
package config/arm64: OPEN CONFIG_PSI and phytium configs 2021-03-16 11:02:59 +08:00
samples samples/vfs: avoid warning in statx override 2021-03-16 16:31:20 +08:00
scripts scripts/gdb: fix lx-symbols 'gdb.error' while loading modules 2021-03-16 16:32:29 +08:00
security apparmor: ensure that dfa state tables have entries 2021-03-16 16:32:02 +08:00
sound ALSA: hda/hdmi: Fix keep_power assignment for non-component devices 2021-03-16 16:32:45 +08:00
tools selftests/net: so_txtime: fix clang issues for target arch PowerPC 2021-03-16 16:32:50 +08:00
usr Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
virt KVM: arm64: Save the host's PtrAuth keys in non-preemptible context 2021-03-16 16:29:14 +08:00
.clang-format Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
.cocciconfig Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
.get_maintainer.ignore Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
.gitattributes Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
.gitignore Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
COPYING Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
CREDITS Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
Kbuild Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
Kconfig Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
MAINTAINERS Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
Makefile Makefile: Fix GCC_TOOLCHAIN_DIR prefix for Clang cross compilation 2021-03-16 16:32:37 +08:00
README Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
README.md Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
backport_remove_lists.txt Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
tools_key.pub Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00

README.md

Tencent Linux Kernel 4.0