linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] vfs: remove redundant sanity check in do_mount
@ 2014-09-12 15:53 Seunghun Lee
  2014-09-12 16:28 ` Al Viro
  2014-09-14 13:15 ` [PATCH] vfs: move getname() from callers to do_mount() Seunghun Lee
  0 siblings, 2 replies; 8+ messages in thread
From: Seunghun Lee @ 2014-09-12 15:53 UTC (permalink / raw)
  To: viro; +Cc: linux-fsdevel, linux-kernel, Seunghun Lee

In sys_mount, getname() checks dir_name.
So do_mount needn't check dir_name again.

Signed-off-by: Seunghun Lee <waydi1@gmail.com>
---
 fs/namespace.c |    5 -----
 1 file changed, 5 deletions(-)

diff --git a/fs/namespace.c b/fs/namespace.c
index bfd03c6..bf8a9af 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -2553,11 +2553,6 @@ long do_mount(const char *dev_name, const char *dir_name,
 	if ((flags & MS_MGC_MSK) == MS_MGC_VAL)
 		flags &= ~MS_MGC_MSK;
 
-	/* Basic sanity checks */
-
-	if (!dir_name || !*dir_name || !memchr(dir_name, 0, PAGE_SIZE))
-		return -EINVAL;
-
 	if (data_page)
 		((char *)data_page)[PAGE_SIZE - 1] = 0;
 
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-09-15  5:26 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-12 15:53 [PATCH] vfs: remove redundant sanity check in do_mount Seunghun Lee
2014-09-12 16:28 ` Al Viro
2014-09-13  4:11   ` Seunghun Lee
2014-09-14 13:15 ` [PATCH] vfs: move getname() from callers to do_mount() Seunghun Lee
2014-09-14 13:36   ` Jeff Layton
2014-09-14 18:12   ` Al Viro
     [not found]     ` <CA+LGb9aaMpiotK7-NUv4hKcJHbuWQE=DC=p=90ZguWqn44qcTQ@mail.gmail.com>
2014-09-15  5:18       ` Al Viro
2014-09-15  5:26         ` Seunghun Lee

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).