jffs2: fix use-after-free on symlink traversal
authorAl Viro <viro@zeniv.linux.org.uk>
Tue, 26 Mar 2019 01:39:50 +0000 (01:39 +0000)
committerAl Viro <viro@zeniv.linux.org.uk>
Mon, 1 Apr 2019 04:31:02 +0000 (00:31 -0400)
commit4fdcfab5b5537c21891e22e65996d4d0dd8ab4ca
treed0c9167b762a5837ac3030d2f1e869454a4c4ac6
parent9e98c678c2d6ae3a17cb2de55d17f69dddaa231b
jffs2: fix use-after-free on symlink traversal

free the symlink body after the same RCU delay we have for freeing the
struct inode itself, so that traversal during RCU pathwalk wouldn't step
into freed memory.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/jffs2/readinode.c
fs/jffs2/super.c