diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-05-07 14:17:26 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-05-07 14:17:26 -0400 |
commit | 78438ce18f26dbcaa8993bb45d20ffb0cec3bc3e (patch) | |
tree | 2f6fe2eb05296a410a44ee7d602cafe2d202467b /fs/nsfs.c | |
parent | 168e153d5ebbdd6a3fa85db1cc4879ed4b7030e0 (diff) | |
parent | ce285c267a003acbf607f3540ff71287f82e5282 (diff) |
Merge branch 'stable-fodder' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull vfs stable fodder fixes from Al Viro:
- acct_on() fix for deadlock caught by overlayfs folks
- autofs RCU use-after-free SNAFU (->d_manage() can be called
locklessly, so we need to RCU-delay freeing the objects it looks at)
- (hopefully) the end of "do we need freeing this dentry RCU-delayed"
whack-a-mole.
* 'stable-fodder' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
autofs: fix use-after-free in lockless ->d_manage()
dcache: sort the freeing-without-RCU-delay mess for good.
acct_on(): don't mess with freeze protection
Diffstat (limited to 'fs/nsfs.c')
-rw-r--r-- | fs/nsfs.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -85,13 +85,12 @@ slow: | |||
85 | inode->i_fop = &ns_file_operations; | 85 | inode->i_fop = &ns_file_operations; |
86 | inode->i_private = ns; | 86 | inode->i_private = ns; |
87 | 87 | ||
88 | dentry = d_alloc_pseudo(mnt->mnt_sb, &empty_name); | 88 | dentry = d_alloc_anon(mnt->mnt_sb); |
89 | if (!dentry) { | 89 | if (!dentry) { |
90 | iput(inode); | 90 | iput(inode); |
91 | return ERR_PTR(-ENOMEM); | 91 | return ERR_PTR(-ENOMEM); |
92 | } | 92 | } |
93 | d_instantiate(dentry, inode); | 93 | d_instantiate(dentry, inode); |
94 | dentry->d_flags |= DCACHE_RCUACCESS; | ||
95 | dentry->d_fsdata = (void *)ns->ops; | 94 | dentry->d_fsdata = (void *)ns->ops; |
96 | d = atomic_long_cmpxchg(&ns->stashed, 0, (unsigned long)dentry); | 95 | d = atomic_long_cmpxchg(&ns->stashed, 0, (unsigned long)dentry); |
97 | if (d) { | 96 | if (d) { |