Commit 0748e55
Al Viro
userns and mnt_idmap leak in open_tree_attr(2)
Once want_mount_setattr() has returned a positive, it does require
finish_mount_kattr() to release ->mnt_userns. Failing do_mount_setattr()
does not change that.
As the result, we can end up leaking userns and possibly mnt_idmap as
well.
Fixes: c4a1682 ("fs: add open_tree_attr()")
Reviewed-by: Christian Brauner <[email protected]>
Signed-off-by: Al Viro <[email protected]>1 parent ce7df19 commit 0748e55
1 file changed
+3
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5307 | 5307 | | |
5308 | 5308 | | |
5309 | 5309 | | |
5310 | | - | |
5311 | | - | |
5312 | | - | |
5313 | | - | |
| 5310 | + | |
5314 | 5311 | | |
5315 | | - | |
5316 | | - | |
5317 | | - | |
5318 | 5312 | | |
5319 | 5313 | | |
| 5314 | + | |
| 5315 | + | |
5320 | 5316 | | |
5321 | 5317 | | |
5322 | 5318 | | |
| |||
0 commit comments