]> git.baikalelectronics.ru Git - kernel.git/commit
debugfs: fix use-after-free on symlink traversal
authorAl Viro <viro@zeniv.linux.org.uk>
Tue, 26 Mar 2019 01:43:37 +0000 (01:43 +0000)
committerAl Viro <viro@zeniv.linux.org.uk>
Mon, 1 Apr 2019 04:31:02 +0000 (00:31 -0400)
commit541ebe12cd595d8eee26b203141aba99b483012e
tree61aa43c048da6f2f480bd999cd9835cf3ef47d9d
parent577ddfbfcafa15c409fdca382d5228c140cb1aa5
debugfs: fix use-after-free on symlink traversal

symlink body shouldn't be freed without an RCU delay.  Switch debugfs to
->destroy_inode() and use of call_rcu(); free both the inode and symlink
body in the callback.  Similar to solution for bpf, only here it's even
more obvious that ->evict_inode() can be dropped.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/debugfs/inode.c