Remove unnecessary string terminator check. Signed-off-by: Ian Kent <raven@xxxxxxxxxx> Signed-off-by: Jeff Moyer <jmoyer@xxxxxxxxxx> --- fs/autofs4/dev-ioctl.c | 20 -------------------- 1 files changed, 0 insertions(+), 20 deletions(-) diff --git a/fs/autofs4/dev-ioctl.c b/fs/autofs4/dev-ioctl.c index 625abf5..304c1ff 100644 --- a/fs/autofs4/dev-ioctl.c +++ b/fs/autofs4/dev-ioctl.c @@ -51,18 +51,6 @@ static int check_name(const char *name) } /* - * Check a string doesn't overrun the chunk of - * memory we copied from user land. - */ -static int invalid_str(char *str, void *end) -{ - while ((void *) str <= end) - if (!*str++) - return 0; - return -EINVAL; -} - -/* * Check that the user compiled against correct version of autofs * misc device code. * @@ -143,14 +131,6 @@ static int validate_dev_ioctl(int cmd, struct autofs_dev_ioctl *param) cmd); goto out; } - - err = invalid_str(param->path, - (void *) ((size_t) param + param->size)); - if (err) { - AUTOFS_WARN("invalid path supplied for cmd(0x%08x)", - cmd); - goto out; - } } err = 0; -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html