]> git.baikalelectronics.ru Git - kernel.git/commit
init: fix regression by supporting devices with major:minor:offset format
authorChen Yu <yu.c.chen@intel.com>
Sun, 3 May 2015 14:35:05 +0000 (22:35 +0800)
committerMike Snitzer <snitzer@redhat.com>
Tue, 5 May 2015 16:31:37 +0000 (12:31 -0400)
commite0452a98c69cd1324f92798508fa1af3b29fca09
treefbd2bd34a8ff0fd7990dea514098f304396815b2
parentbe5368641e693bd61e7ee6601d2282afa2d6bfb4
init: fix regression by supporting devices with major:minor:offset format

Commit d69dd15ed ("init: stricter checking of major:minor root=
values") was so strict that it exposed the fact that a previously
unknown device format was being used.

Distributions like Ubuntu uses klibc (rather than uswsusp) to resume
system from hibernation.  klibc expressed the swap partition/file in
the form of major:minor:offset.  For example, 8:3:0 represents a swap
partition in klibc, and klibc's resume process in initrd will finally
echo 8:3:0 to /sys/power/resume for manually resuming.  However, due
to commit d69dd15ed's stricter checking, 8:3:0 will be treated as an
invalid device format, and manual resuming from hibernation will fail.

Fix this by adding support for devices with major:minor:offset format
when resuming from hibernation.

Reported-by: Prigent, Christophe <christophe.prigent@intel.com>
Signed-off-by: Chen Yu <yu.c.chen@intel.com>
Acked-by: Rafael J. Wysocki <rjw@rjwysocki.net>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
init/do_mounts.c