https://github.com/torvalds/linux
Revision 1bcb344086f3ecf8d6705f6d708441baa823beb3 authored by Jeff Layton on 15 April 2019, 16:00:42 UTC, committed by Ilya Dryomov on 23 April 2019, 19:37:54 UTC
Ben reported tripping the BUG_ON in create_request_message during some
performance testing. Analysis of the vmcore showed that the length of
the r_dentry->d_name string changed after we allocated the buffer, but
before we encoded it.

build_dentry_path returns pointers to d_name in the common case of
non-snapped dentries, but this optimization isn't safe unless the parent
directory is locked. When it isn't, have the code make a copy of the
d_name while holding the d_lock.

Cc: stable@vger.kernel.org
Reported-by: Ben England <bengland@redhat.com>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: "Yan, Zheng" <zyan@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
1 parent 085b775
History
Tip revision: 1bcb344086f3ecf8d6705f6d708441baa823beb3 authored by Jeff Layton on 15 April 2019, 16:00:42 UTC
ceph: only use d_name directly when parent is locked
Tip revision: 1bcb344
File Mode Size
Documentation
LICENSES
arch
block
certs
crypto
drivers
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.clang-format -rw-r--r-- 14.6 KB
.cocciconfig -rw-r--r-- 59 bytes
.get_maintainer.ignore -rw-r--r-- 31 bytes
.gitattributes -rw-r--r-- 30 bytes
.gitignore -rw-r--r-- 1.5 KB
.mailmap -rw-r--r-- 11.0 KB
COPYING -rw-r--r-- 423 bytes
CREDITS -rw-r--r-- 96.9 KB
Kbuild -rw-r--r-- 1.5 KB
Kconfig -rw-r--r-- 563 bytes
MAINTAINERS -rw-r--r-- 491.4 KB
Makefile -rw-r--r-- 58.3 KB
README -rw-r--r-- 727 bytes

README

back to top