projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f6957b7
)
blob_to_mnt(): kern_unmount() is needed to undo kern_mount()
author
Al Viro
<viro@zeniv.linux.org.uk>
Wed, 2 Mar 2022 21:11:23 +0000
(16:11 -0500)
committer
Al Viro
<viro@zeniv.linux.org.uk>
Fri, 20 May 2022 03:25:47 +0000
(23:25 -0400)
plain mntput() won't do.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
kernel/usermode_driver.c
patch
|
blob
|
history
diff --git
a/kernel/usermode_driver.c
b/kernel/usermode_driver.c
index 9dae1f6487136a3b9132c6f18c5c2aba2a028fc4..8303f4c7ca714a0aa96aeec4be8c8423ce8a200d 100644
(file)
--- 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)) {
-
mntpu
t(mnt);
+
kern_unmoun
t(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);
-
mntpu
t(mnt);
+
kern_unmoun
t(mnt);
return ERR_PTR(err);
}