]> git.karo-electronics.de Git - karo-tx-linux.git/commit
This patch makes two changes:
authorWill Drewry <wad@chromium.org>
Wed, 3 Aug 2011 00:52:30 +0000 (10:52 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 24 Aug 2011 05:24:05 +0000 (15:24 +1000)
commitbd55329bbafc699a271e069eef997d9c04e36c1f
treec3b54235a074dfa7b6f9285980e7718b704f55e4
parent9305168397d03ff1fdff944a4432348d83375e10
This patch makes two changes:
- check for trailing characters after parsing PARTNROFF=%d
- disable root_wait if a syntax error is seen

The former assures that bad input like
  root=PARTUUID=<validuuid>/PARTNROFF=5abc
properly fails by attempting to parse an extra character after the
integer.  If the integer is missing, sscanf will fail, but if it is
present, and there is a trailing non-nul character, then the extra
field will be parsed and the error case will be hit.

The latter assures that if rootwait has been specified, the error
message isn't flooded to the screen during rootwait's loop.  Instead of
adding printk ratelimiting, root_wait was disabled.  This stays true to
the rootwait goal of support asynchronous device arrival while still
providing users with helpful messages.  With ratelimiting or disabling
logging on rootwait, a range of edge cases turn up where the user would
not be informed of an error properly.

Signed-off-by: Will Drewry <wad@chromium.org>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Randy Dunlap <rdunlap@xenotime.net>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
init/do_mounts.c