]> git.kernelconcepts.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, 10 Aug 2011 01:50:31 +0000 (11:50 +1000)
commit185237e4cfab63c5576eb9487ce11306fe2f79f7
treebbb011ba5a7dfe1d93b4fb8e52fc5b6b1cfae416
parentdec15f68f20865e076a0d5480fd6e7c5f13c268c
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