summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2022-03-02 16:11:23 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2022-05-19 23:25:47 -0400
commit279b192c23d2fc9cb9e8c3851d6cad968f51789f (patch)
tree7157657dde28c452abad2b74f74c9db706925bf8 /kernel
parentf6957b7191ed8b55c1d2a28fa23c6a7d327b4408 (diff)
downloadlinux-stable-279b192c23d2fc9cb9e8c3851d6cad968f51789f.tar.gz
linux-stable-279b192c23d2fc9cb9e8c3851d6cad968f51789f.tar.bz2
linux-stable-279b192c23d2fc9cb9e8c3851d6cad968f51789f.zip
blob_to_mnt(): kern_unmount() is needed to undo kern_mount()
plain mntput() won't do. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/usermode_driver.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/usermode_driver.c b/kernel/usermode_driver.c
index 9dae1f648713..8303f4c7ca71 100644
--- a/kernel/usermode_driver.c
+++ b/kernel/usermode_driver.c
@@ -28,7 +28,7 @@ static struct vfsmount *blob_to_mnt(const void *data, size_t len, const char *na
file = file_open_root_mnt(mnt, name, O_CREAT | O_WRONLY, 0700);
if (IS_ERR(file)) {
- mntput(mnt);
+ kern_unmount(mnt);
return ERR_CAST(file);
}
@@ -38,7 +38,7 @@ static struct vfsmount *blob_to_mnt(const void *data, size_t len, const char *na
if (err >= 0)
err = -ENOMEM;
filp_close(file, NULL);
- mntput(mnt);
+ kern_unmount(mnt);
return ERR_PTR(err);
}