Re: [PATCH v3 RFT 1/2] init/do_mounts.c: ignore final \n inname_to_dev_t

From: Pavel Machek
Date: Thu Sep 19 2013 - 06:10:41 EST


On Wed 2013-09-18 16:29:01, Sebastian Capella wrote:
> Enhance name_to_dev_t to handle trailing newline characters
> on device paths. Some inputs to name_to_dev_t may come from
> userspace where oftentimes a '\n' is appended to the path.
> Added const to the name buffer in both the function
> declaration and the prototype to reflect input buffer
> handling.
>
> By handling trailing newlines in name_to_dev_t, userspace
> buffers may be directly passed to name_to_dev_t without
> modification.
>
> Signed-off-by: Sebastian Capella <sebastian.capella@xxxxxxxxxx>
> Cc: Pavel Machek <pavel@xxxxxx>

Reviewed-by: Pavel Machek <pavel@xxxxxx>

--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/