]> 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>
Mon, 15 Aug 2011 04:44:04 +0000 (14:44 +1000)
commit89c9b0c614ad33fc939084fed71b93b1a3062050
tree9ec1ef3c87a59afc016d86ad5bbb1844fa00da1b
parentcb626e5eb4d02a4c052801fd325d44aaad752ff1
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