Commit 012e332
fs/mount_setattr: always cleanup mount_kattr
Make sure that finish_mount_kattr() is called after mount_kattr was
succesfully built in both the success and failure case to prevent
leaking any references we took when we built it. We returned early if
path lookup failed thereby risking to leak an additional reference we
took when building mount_kattr when an idmapped mount was requested.
Cc: linux-fsdevel@vger.kernel.org
Cc: stable@vger.kernel.org
Fixes: 9caccd4 ("fs: introduce MOUNT_ATTR_IDMAP")
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>1 parent 74c78b4 commit 012e332
1 file changed
Lines changed: 4 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4263 | 4263 | | |
4264 | 4264 | | |
4265 | 4265 | | |
4266 | | - | |
4267 | | - | |
4268 | | - | |
4269 | | - | |
| 4266 | + | |
| 4267 | + | |
| 4268 | + | |
| 4269 | + | |
4270 | 4270 | | |
4271 | | - | |
4272 | 4271 | | |
4273 | 4272 | | |
4274 | 4273 | | |
| |||
0 commit comments