linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [4.1-rc1][Hibernation failed]  bisect result  included
@ 2015-05-03 15:54 Chen, Yu C
  2015-05-03 18:24 ` Martin Steigerwald
  2015-05-04 14:08 ` Rafael J. Wysocki
  0 siblings, 2 replies; 10+ messages in thread
From: Chen, Yu C @ 2015-05-03 15:54 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-pm, Wysocki, Rafael J, dehrenberg, Zhang, Rui, Lu, Aaron

[-- Attachment #1: Type: text/plain, Size: 1026 bytes --]

Hi,all,
When we are doing QA test, a hibernation failor was found on latest kernel 4.1-rc1,
resume from hibernation failed with the following error:

PM: Hibernation image not present or could not be loaded.

Bisect shows following commit might trigger this problem:
commit 283e7ad0241155710f99a9f39d13313a53336926

The  reason for failor is that, some distribution use klibc in initrd
to restore the image, and klibc will provide kernel with the device 
format of major:minor:offset,
for example, 8:3:0 represents a swap partition, and klibc will
echo 8:3:0 > /sys/power/resume to resume the system manually.
However in current implementation, format of 8:3:0 will be regarded 
as an invalid device, so restoring from hibernation failed.

Do we need to add support for device format like 8:3:0?
I'm happy to debug more specifically if you can let me know what 
would be of use, and I've also attached a temporary patch 
for this problem, not sure if it is suitable,  thanks.




Best Regards,
Yu


[-- Attachment #2: 0001-init-support-device-of-major-minor-offset-format.patch --]
[-- Type: application/octet-stream, Size: 1601 bytes --]

From a65d76c143b315c322b5c7a9fb365703c9f32798 Mon Sep 17 00:00:00 2001
From: Chen Yu <yu.c.chen@intel.com>
Date: Sun, 3 May 2015 22:35:05 +0800
Subject: [RFC] init: support device of major:minor:offset format

Distribution like Ubuntu uses klibc rather than uswsusp to resume
system from hibernation, which will treat 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 restoring.
However in current implementation, 8:3:0 will be treated as an invalid
device format, and it is found that manual resumming from hibernation
will fail on lastest kernel.

This patch adds support for device with major:minor:offset format
when resumming from hibernation.

Reported-by: Prigent, Christophe <christophe.prigent@intel.com>

Signed-off-by: Chen Yu <yu.c.chen@intel.com>
---
 init/do_mounts.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/init/do_mounts.c b/init/do_mounts.c
index 8369ffa..2d36bf1 100644
--- a/init/do_mounts.c
+++ b/init/do_mounts.c
@@ -225,10 +225,12 @@ dev_t name_to_dev_t(const char *name)
 #endif
 
 	if (strncmp(name, "/dev/", 5) != 0) {
-		unsigned maj, min;
+		unsigned maj, min, offset;
 		char dummy;
 
-		if (sscanf(name, "%u:%u%c", &maj, &min, &dummy) == 2) {
+		if ((sscanf(name, "%u:%u%c", &maj, &min, &dummy) == 2) ||
+			(sscanf(name, "%u:%u:%u:%c", &maj, &min, &offset,
+			&dummy) == 3)) {
 			res = MKDEV(maj, min);
 			if (maj != MAJOR(res) || min != MINOR(res))
 				goto fail;
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [4.1-rc1][Hibernation failed]  bisect result  included
  2015-05-03 15:54 [4.1-rc1][Hibernation failed] bisect result included Chen, Yu C
@ 2015-05-03 18:24 ` Martin Steigerwald
  2015-05-04  7:50   ` Yu Chen
  2015-05-04 14:08 ` Rafael J. Wysocki
  1 sibling, 1 reply; 10+ messages in thread
From: Martin Steigerwald @ 2015-05-03 18:24 UTC (permalink / raw)
  To: Chen, Yu C
  Cc: linux-kernel, linux-pm, Wysocki, Rafael J, dehrenberg, Zhang,
	Rui, Lu, Aaron

Am Sonntag, 3. Mai 2015, 15:54:39 schrieb Chen, Yu C:
> Hi,all,

Hello!

> When we are doing QA test, a hibernation failor was found on latest kernel 4.1-rc1,
> resume from hibernation failed with the following error:
> 
> PM: Hibernation image not present or could not be loaded.
> 
> Bisect shows following commit might trigger this problem:
> commit 283e7ad0241155710f99a9f39d13313a53336926
> 
> The  reason for failor is that, some distribution use klibc in initrd
> to restore the image, and klibc will provide kernel with the device 
> format of major:minor:offset,
> for example, 8:3:0 represents a swap partition, and klibc will
> echo 8:3:0 > /sys/power/resume to resume the system manually.
> However in current implementation, format of 8:3:0 will be regarded 
> as an invalid device, so restoring from hibernation failed.
> 
> Do we need to add support for device format like 8:3:0?
> I'm happy to debug more specifically if you can let me know what 
> would be of use, and I've also attached a temporary patch 
> for this problem, not sure if it is suitable,  thanks.

Wow, great.

I just reported this as well, but you bisected it already.

So seems Debian´s initramfs uses klibc. Appears so:

https://wiki.debian.org/initramfs

merkaba:/boot> lsinitramfs -l initrd.img-4.0.1-tp520-btrfs-trim-norace+ | egrep "klibc|libc.so"
-rwxr-xr-x   1 root     root      1729984 Apr 15 02:01 lib/x86_64-linux-gnu/libc.so.6
-rwxr-xr-x   1 root     root        71416 Oct  5  2014 lib/klibc-IpHGKKbZiB_yZ7GPagmQz2GwVAQ.so

It seems to contain a glibc as well.

Ciao,
-- 
Martin 'Helios' Steigerwald - http://www.Lichtvoll.de
GPG: 03B0 0D6C 0040 0710 4AFA  B82F 991B EAAC A599 84C7

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [4.1-rc1][Hibernation failed]  bisect result  included
  2015-05-03 18:24 ` Martin Steigerwald
@ 2015-05-04  7:50   ` Yu Chen
  0 siblings, 0 replies; 10+ messages in thread
From: Yu Chen @ 2015-05-04  7:50 UTC (permalink / raw)
  To: Martin Steigerwald
  Cc: linux-kernel, linux-pm, Wysocki, Rafael J, dehrenberg, Zhang,
	Rui, Lu, Aaron

On 05/04/2015 02:24 AM, Martin Steigerwald wrote:
> Am Sonntag, 3. Mai 2015, 15:54:39 schrieb Chen, Yu C:
>> Hi,all,
>
> Hello!
>
>> When we are doing QA test, a hibernation failor was found on latest kernel 4.1-rc1,
>> resume from hibernation failed with the following error:
>>
>> PM: Hibernation image not present or could not be loaded.
>>
>> Bisect shows following commit might trigger this problem:
>> commit 283e7ad0241155710f99a9f39d13313a53336926
>>
>> The  reason for failor is that, some distribution use klibc in initrd
>> to restore the image, and klibc will provide kernel with the device
>> format of major:minor:offset,
>> for example, 8:3:0 represents a swap partition, and klibc will
>> echo 8:3:0 > /sys/power/resume to resume the system manually.
>> However in current implementation, format of 8:3:0 will be regarded
>> as an invalid device, so restoring from hibernation failed.
>>
>> Do we need to add support for device format like 8:3:0?
>> I'm happy to debug more specifically if you can let me know what
>> would be of use, and I've also attached a temporary patch
>> for this problem, not sure if it is suitable,  thanks.
>
> Wow, great.
>
> I just reported this as well, but you bisected it already.
>
Oh, I saw your thread :)
> So seems Debian´s initramfs uses klibc. Appears so:
>
The place where klibc stores the major:minor:offset to sysfs is:
klibc/usr/kinit/resume/resumelib.c: resume

> https://wiki.debian.org/initramfs
>
> merkaba:/boot> lsinitramfs -l initrd.img-4.0.1-tp520-btrfs-trim-norace+ | egrep "klibc|libc.so"
> -rwxr-xr-x   1 root     root      1729984 Apr 15 02:01 lib/x86_64-linux-gnu/libc.so.6
> -rwxr-xr-x   1 root     root        71416 Oct  5  2014 lib/klibc-IpHGKKbZiB_yZ7GPagmQz2GwVAQ.so
>
> It seems to contain a glibc as well.
>
> Ciao,
>


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [4.1-rc1][Hibernation failed]  bisect result  included
  2015-05-03 15:54 [4.1-rc1][Hibernation failed] bisect result included Chen, Yu C
  2015-05-03 18:24 ` Martin Steigerwald
@ 2015-05-04 14:08 ` Rafael J. Wysocki
  2015-05-04 14:26   ` Mike Snitzer
  1 sibling, 1 reply; 10+ messages in thread
From: Rafael J. Wysocki @ 2015-05-04 14:08 UTC (permalink / raw)
  To: Chen, Yu C, Mike Snitzer, Dan Ehrenberg
  Cc: linux-kernel, linux-pm, Wysocki, Rafael J, Zhang, Rui, Lu, Aaron,
	Martin Steigerwald

On Sunday, May 03, 2015 03:54:39 PM Chen, Yu C wrote:
> Hi,all,
> When we are doing QA test, a hibernation failor was found on latest kernel 4.1-rc1,
> resume from hibernation failed with the following error:
> 
> PM: Hibernation image not present or could not be loaded.
> 
> Bisect shows following commit might trigger this problem:
> commit 283e7ad0241155710f99a9f39d13313a53336926
> 
> The  reason for failor is that, some distribution use klibc in initrd
> to restore the image, and klibc will provide kernel with the device 
> format of major:minor:offset,
> for example, 8:3:0 represents a swap partition, and klibc will
> echo 8:3:0 > /sys/power/resume to resume the system manually.
> However in current implementation, format of 8:3:0 will be regarded 
> as an invalid device, so restoring from hibernation failed.
> 
> Do we need to add support for device format like 8:3:0?
> I'm happy to debug more specifically if you can let me know what 
> would be of use, and I've also attached a temporary patch 
> for this problem, not sure if it is suitable,  thanks.

It'd be better to send the patch inline so it is not lost in replies.
Reproduced below.

Dan, Mike, any chance to look at this?  It is a functional regression for
some people.


---
>From a65d76c143b315c322b5c7a9fb365703c9f32798 Mon Sep 17 00:00:00 2001
From: Chen Yu <yu.c.chen@intel.com>
Date: Sun, 3 May 2015 22:35:05 +0800
Subject: [RFC] init: support device of major:minor:offset format

Distribution like Ubuntu uses klibc rather than uswsusp to resume
system from hibernation, which will treat 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 restoring.
However in current implementation, 8:3:0 will be treated as an invalid
device format, and it is found that manual resumming from hibernation
will fail on lastest kernel.

This patch adds support for device with major:minor:offset format
when resumming from hibernation.

Reported-by: Prigent, Christophe <christophe.prigent@intel.com>

Signed-off-by: Chen Yu <yu.c.chen@intel.com>
---
 init/do_mounts.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/init/do_mounts.c b/init/do_mounts.c
index 8369ffa..2d36bf1 100644
--- a/init/do_mounts.c
+++ b/init/do_mounts.c
@@ -225,10 +225,12 @@ dev_t name_to_dev_t(const char *name)
 #endif
 
 	if (strncmp(name, "/dev/", 5) != 0) {
-		unsigned maj, min;
+		unsigned maj, min, offset;
 		char dummy;
 
-		if (sscanf(name, "%u:%u%c", &maj, &min, &dummy) == 2) {
+		if ((sscanf(name, "%u:%u%c", &maj, &min, &dummy) == 2) ||
+			(sscanf(name, "%u:%u:%u:%c", &maj, &min, &offset,
+			&dummy) == 3)) {
 			res = MKDEV(maj, min);
 			if (maj != MAJOR(res) || min != MINOR(res))
 				goto fail;
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [4.1-rc1][Hibernation failed]  bisect result  included
  2015-05-04 14:08 ` Rafael J. Wysocki
@ 2015-05-04 14:26   ` Mike Snitzer
  2015-05-04 21:26     ` Rafael J. Wysocki
  2015-05-05  2:30     ` Yu Chen
  0 siblings, 2 replies; 10+ messages in thread
From: Mike Snitzer @ 2015-05-04 14:26 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Chen, Yu C, Dan Ehrenberg, linux-kernel, linux-pm, Wysocki,
	Rafael J, Zhang, Rui, Lu, Aaron, Martin Steigerwald, dm-devel

On Mon, May 04 2015 at 10:08am -0400,
Rafael J. Wysocki <rjw@rjwysocki.net> wrote:

> On Sunday, May 03, 2015 03:54:39 PM Chen, Yu C wrote:
> > Hi,all,
> > When we are doing QA test, a hibernation failor was found on latest kernel 4.1-rc1,
> > resume from hibernation failed with the following error:
> > 
> > PM: Hibernation image not present or could not be loaded.
> > 
> > Bisect shows following commit might trigger this problem:
> > commit 283e7ad0241155710f99a9f39d13313a53336926
> > 
> > The  reason for failor is that, some distribution use klibc in initrd
> > to restore the image, and klibc will provide kernel with the device 
> > format of major:minor:offset,
> > for example, 8:3:0 represents a swap partition, and klibc will
> > echo 8:3:0 > /sys/power/resume to resume the system manually.
> > However in current implementation, format of 8:3:0 will be regarded 
> > as an invalid device, so restoring from hibernation failed.
> > 
> > Do we need to add support for device format like 8:3:0?
> > I'm happy to debug more specifically if you can let me know what 
> > would be of use, and I've also attached a temporary patch 
> > for this problem, not sure if it is suitable,  thanks.
> 
> It'd be better to send the patch inline so it is not lost in replies.
> Reproduced below.
> 
> Dan, Mike, any chance to look at this?  It is a functional regression for
> some people.

Sorry about this.  Wasn't aware that such a strange format was being
used.  The proposed patch looks good to me (formatting is a bit weird
though, the last "&dummy) == 3)) {" line shouldnt be needed if previous
line isn't indented so far.

Unless other more official init maintainer(s) want to pick this fix up:
since I committed the commit that caused this regression I can pick this
patch up and get it to Linus for 4.1-rc3 inclussion via linux-dm.git.
Please just let me know, thanks!

> ---
> From a65d76c143b315c322b5c7a9fb365703c9f32798 Mon Sep 17 00:00:00 2001
> From: Chen Yu <yu.c.chen@intel.com>
> Date: Sun, 3 May 2015 22:35:05 +0800
> Subject: [RFC] init: support device of major:minor:offset format
> 
> Distribution like Ubuntu uses klibc rather than uswsusp to resume
> system from hibernation, which will treat 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 restoring.
> However in current implementation, 8:3:0 will be treated as an invalid
> device format, and it is found that manual resumming from hibernation
> will fail on lastest kernel.
> 
> This patch adds support for device with major:minor:offset format
> when resumming from hibernation.
> 
> Reported-by: Prigent, Christophe <christophe.prigent@intel.com>
> 
> Signed-off-by: Chen Yu <yu.c.chen@intel.com>
> ---
>  init/do_mounts.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/init/do_mounts.c b/init/do_mounts.c
> index 8369ffa..2d36bf1 100644
> --- a/init/do_mounts.c
> +++ b/init/do_mounts.c
> @@ -225,10 +225,12 @@ dev_t name_to_dev_t(const char *name)
>  #endif
>  
>  	if (strncmp(name, "/dev/", 5) != 0) {
> -		unsigned maj, min;
> +		unsigned maj, min, offset;
>  		char dummy;
>  
> -		if (sscanf(name, "%u:%u%c", &maj, &min, &dummy) == 2) {
> +		if ((sscanf(name, "%u:%u%c", &maj, &min, &dummy) == 2) ||
> +			(sscanf(name, "%u:%u:%u:%c", &maj, &min, &offset,
> +			&dummy) == 3)) {
>  			res = MKDEV(maj, min);
>  			if (maj != MAJOR(res) || min != MINOR(res))
>  				goto fail;
> -- 
> 1.9.1
> 
> 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [4.1-rc1][Hibernation failed]  bisect result  included
  2015-05-04 14:26   ` Mike Snitzer
@ 2015-05-04 21:26     ` Rafael J. Wysocki
  2015-05-05  2:30     ` Yu Chen
  1 sibling, 0 replies; 10+ messages in thread
From: Rafael J. Wysocki @ 2015-05-04 21:26 UTC (permalink / raw)
  To: Mike Snitzer
  Cc: Chen, Yu C, Dan Ehrenberg, linux-kernel, linux-pm, Wysocki,
	Rafael J, Zhang, Rui, Lu, Aaron, Martin Steigerwald, dm-devel

On Monday, May 04, 2015 10:26:54 AM Mike Snitzer wrote:
> On Mon, May 04 2015 at 10:08am -0400,
> Rafael J. Wysocki <rjw@rjwysocki.net> wrote:
> 
> > On Sunday, May 03, 2015 03:54:39 PM Chen, Yu C wrote:
> > > Hi,all,
> > > When we are doing QA test, a hibernation failor was found on latest kernel 4.1-rc1,
> > > resume from hibernation failed with the following error:
> > > 
> > > PM: Hibernation image not present or could not be loaded.
> > > 
> > > Bisect shows following commit might trigger this problem:
> > > commit 283e7ad0241155710f99a9f39d13313a53336926
> > > 
> > > The  reason for failor is that, some distribution use klibc in initrd
> > > to restore the image, and klibc will provide kernel with the device 
> > > format of major:minor:offset,
> > > for example, 8:3:0 represents a swap partition, and klibc will
> > > echo 8:3:0 > /sys/power/resume to resume the system manually.
> > > However in current implementation, format of 8:3:0 will be regarded 
> > > as an invalid device, so restoring from hibernation failed.
> > > 
> > > Do we need to add support for device format like 8:3:0?
> > > I'm happy to debug more specifically if you can let me know what 
> > > would be of use, and I've also attached a temporary patch 
> > > for this problem, not sure if it is suitable,  thanks.
> > 
> > It'd be better to send the patch inline so it is not lost in replies.
> > Reproduced below.
> > 
> > Dan, Mike, any chance to look at this?  It is a functional regression for
> > some people.
> 
> Sorry about this.  Wasn't aware that such a strange format was being
> used.  The proposed patch looks good to me (formatting is a bit weird
> though, the last "&dummy) == 3)) {" line shouldnt be needed if previous
> line isn't indented so far.
> 
> Unless other more official init maintainer(s) want to pick this fix up:
> since I committed the commit that caused this regression I can pick this
> patch up and get it to Linus for 4.1-rc3 inclussion via linux-dm.git.
> Please just let me know, thanks!

Please pick it up if you can.  I won't bet any amount of money on anyone
else doing that ...


-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [4.1-rc1][Hibernation failed]  bisect result  included
  2015-05-04 14:26   ` Mike Snitzer
  2015-05-04 21:26     ` Rafael J. Wysocki
@ 2015-05-05  2:30     ` Yu Chen
  2015-05-05 20:48       ` Rafael J. Wysocki
  1 sibling, 1 reply; 10+ messages in thread
From: Yu Chen @ 2015-05-05  2:30 UTC (permalink / raw)
  To: Mike Snitzer, Rafael J. Wysocki
  Cc: Dan Ehrenberg, linux-kernel, linux-pm, Wysocki, Rafael J, Zhang,
	Rui, Lu, Aaron, Martin Steigerwald, dm-devel

On 05/04/2015 10:26 PM, Mike Snitzer wrote:
> On Mon, May 04 2015 at 10:08am -0400,
> Rafael J. Wysocki <rjw@rjwysocki.net> wrote:
>
>> On Sunday, May 03, 2015 03:54:39 PM Chen, Yu C wrote:
>>> Hi,all,
>>> When we are doing QA test, a hibernation failor was found on latest kernel 4.1-rc1,
>>> resume from hibernation failed with the following error:
>>>
>>> PM: Hibernation image not present or could not be loaded.
>>>
>>> Bisect shows following commit might trigger this problem:
>>> commit 283e7ad0241155710f99a9f39d13313a53336926
>>>
>>> The  reason for failor is that, some distribution use klibc in initrd
>>> to restore the image, and klibc will provide kernel with the device
>>> format of major:minor:offset,
>>> for example, 8:3:0 represents a swap partition, and klibc will
>>> echo 8:3:0 > /sys/power/resume to resume the system manually.
>>> However in current implementation, format of 8:3:0 will be regarded
>>> as an invalid device, so restoring from hibernation failed.
>>>
>>> Do we need to add support for device format like 8:3:0?
>>> I'm happy to debug more specifically if you can let me know what
>>> would be of use, and I've also attached a temporary patch
>>> for this problem, not sure if it is suitable,  thanks.
>>
>> It'd be better to send the patch inline so it is not lost in replies.
>> Reproduced below.
>>
>> Dan, Mike, any chance to look at this?  It is a functional regression for
>> some people.
>
> Sorry about this.  Wasn't aware that such a strange format was being
> used.  The proposed patch looks good to me (formatting is a bit weird
> though, the last "&dummy) == 3)) {" line shouldnt be needed if previous
> line isn't indented so far.
>

Thank you very much, Mike and Rafeal,
I'll send another version titled with V2 for review.

Best Regards,
Yu

> Unless other more official init maintainer(s) want to pick this fix up:
> since I committed the commit that caused this regression I can pick this
> patch up and get it to Linus for 4.1-rc3 inclussion via linux-dm.git.
> Please just let me know, thanks!
>
>> ---
>>  From a65d76c143b315c322b5c7a9fb365703c9f32798 Mon Sep 17 00:00:00 2001
>> From: Chen Yu <yu.c.chen@intel.com>
>> Date: Sun, 3 May 2015 22:35:05 +0800
>> Subject: [RFC] init: support device of major:minor:offset format
>>
>> Distribution like Ubuntu uses klibc rather than uswsusp to resume
>> system from hibernation, which will treat 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 restoring.
>> However in current implementation, 8:3:0 will be treated as an invalid
>> device format, and it is found that manual resumming from hibernation
>> will fail on lastest kernel.
>>
>> This patch adds support for device with major:minor:offset format
>> when resumming from hibernation.
>>
>> Reported-by: Prigent, Christophe <christophe.prigent@intel.com>
>>
>> Signed-off-by: Chen Yu <yu.c.chen@intel.com>
>> ---
>>   init/do_mounts.c | 6 ++++--
>>   1 file changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/init/do_mounts.c b/init/do_mounts.c
>> index 8369ffa..2d36bf1 100644
>> --- a/init/do_mounts.c
>> +++ b/init/do_mounts.c
>> @@ -225,10 +225,12 @@ dev_t name_to_dev_t(const char *name)
>>   #endif
>>
>>   	if (strncmp(name, "/dev/", 5) != 0) {
>> -		unsigned maj, min;
>> +		unsigned maj, min, offset;
>>   		char dummy;
>>
>> -		if (sscanf(name, "%u:%u%c", &maj, &min, &dummy) == 2) {
>> +		if ((sscanf(name, "%u:%u%c", &maj, &min, &dummy) == 2) ||
>> +			(sscanf(name, "%u:%u:%u:%c", &maj, &min, &offset,
>> +			&dummy) == 3)) {
>>   			res = MKDEV(maj, min);
>>   			if (maj != MAJOR(res) || min != MINOR(res))
>>   				goto fail;
>> --
>> 1.9.1
>>
>>


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [4.1-rc1][Hibernation failed]  bisect result  included
  2015-05-05  2:30     ` Yu Chen
@ 2015-05-05 20:48       ` Rafael J. Wysocki
  2015-05-06  2:01         ` Mike Snitzer
  0 siblings, 1 reply; 10+ messages in thread
From: Rafael J. Wysocki @ 2015-05-05 20:48 UTC (permalink / raw)
  To: Yu Chen
  Cc: Mike Snitzer, Dan Ehrenberg, linux-kernel, linux-pm, Wysocki,
	Rafael J, Zhang, Rui, Lu, Aaron, Martin Steigerwald, dm-devel

On Tuesday, May 05, 2015 10:30:28 AM Yu Chen wrote:
> On 05/04/2015 10:26 PM, Mike Snitzer wrote:
> > On Mon, May 04 2015 at 10:08am -0400,
> > Rafael J. Wysocki <rjw@rjwysocki.net> wrote:
> >
> >> On Sunday, May 03, 2015 03:54:39 PM Chen, Yu C wrote:
> >>> Hi,all,
> >>> When we are doing QA test, a hibernation failor was found on latest kernel 4.1-rc1,
> >>> resume from hibernation failed with the following error:
> >>>
> >>> PM: Hibernation image not present or could not be loaded.
> >>>
> >>> Bisect shows following commit might trigger this problem:
> >>> commit 283e7ad0241155710f99a9f39d13313a53336926
> >>>
> >>> The  reason for failor is that, some distribution use klibc in initrd
> >>> to restore the image, and klibc will provide kernel with the device
> >>> format of major:minor:offset,
> >>> for example, 8:3:0 represents a swap partition, and klibc will
> >>> echo 8:3:0 > /sys/power/resume to resume the system manually.
> >>> However in current implementation, format of 8:3:0 will be regarded
> >>> as an invalid device, so restoring from hibernation failed.
> >>>
> >>> Do we need to add support for device format like 8:3:0?
> >>> I'm happy to debug more specifically if you can let me know what
> >>> would be of use, and I've also attached a temporary patch
> >>> for this problem, not sure if it is suitable,  thanks.
> >>
> >> It'd be better to send the patch inline so it is not lost in replies.
> >> Reproduced below.
> >>
> >> Dan, Mike, any chance to look at this?  It is a functional regression for
> >> some people.
> >
> > Sorry about this.  Wasn't aware that such a strange format was being
> > used.  The proposed patch looks good to me (formatting is a bit weird
> > though, the last "&dummy) == 3)) {" line shouldnt be needed if previous
> > line isn't indented so far.
> >
> 
> Thank you very much, Mike and Rafeal,
> I'll send another version titled with V2 for review.

Have you sent it already?  Where is it if so?


-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [4.1-rc1][Hibernation failed]  bisect result  included
  2015-05-05 20:48       ` Rafael J. Wysocki
@ 2015-05-06  2:01         ` Mike Snitzer
  2015-05-06  2:59           ` Yu Chen
  0 siblings, 1 reply; 10+ messages in thread
From: Mike Snitzer @ 2015-05-06  2:01 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Yu Chen, Dan Ehrenberg, linux-kernel, linux-pm, Wysocki,
	Rafael J, Zhang, Rui, Lu, Aaron, Martin Steigerwald, dm-devel

On Tue, May 05 2015 at  4:48pm -0400,
Rafael J. Wysocki <rjw@rjwysocki.net> wrote:

> On Tuesday, May 05, 2015 10:30:28 AM Yu Chen wrote:
> > 
> > Thank you very much, Mike and Rafeal,
> > I'll send another version titled with V2 for review.
> 
> Have you sent it already?  Where is it if so?

I staged what I was expecting v2 to be in linux-dm.git's 'for-next'
earlier today.  I am planning to send it to Linus on Thursday, see:

https://git.kernel.org/cgit/linux/kernel/git/device-mapper/linux-dm.git/commit/?h=for-next&id=cb31ef485dd4c6a205d1064b42027f82076d00c8

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [4.1-rc1][Hibernation failed]  bisect result  included
  2015-05-06  2:01         ` Mike Snitzer
@ 2015-05-06  2:59           ` Yu Chen
  0 siblings, 0 replies; 10+ messages in thread
From: Yu Chen @ 2015-05-06  2:59 UTC (permalink / raw)
  To: Mike Snitzer, Rafael J. Wysocki
  Cc: Dan Ehrenberg, linux-kernel, linux-pm, Wysocki, Rafael J, Zhang,
	Rui, Lu, Aaron, Martin Steigerwald, dm-devel

On 05/06/2015 10:01 AM, Mike Snitzer wrote:
> On Tue, May 05 2015 at  4:48pm -0400,
> Rafael J. Wysocki <rjw@rjwysocki.net> wrote:
>
>> On Tuesday, May 05, 2015 10:30:28 AM Yu Chen wrote:
>>>
>>> Thank you very much, Mike and Rafeal,
>>> I'll send another version titled with V2 for review.
>>
>> Have you sent it already?  Where is it if so?
>
> I staged what I was expecting v2 to be in linux-dm.git's 'for-next'
> earlier today.  I am planning to send it to Linus on Thursday, see:
>
> https://git.kernel.org/cgit/linux/kernel/git/device-mapper/linux-dm.git/commit/?h=for-next&id=cb31ef485dd4c6a205d1064b42027f82076d00c8
>
Thanks, Mike

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2015-05-06  2:55 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-03 15:54 [4.1-rc1][Hibernation failed] bisect result included Chen, Yu C
2015-05-03 18:24 ` Martin Steigerwald
2015-05-04  7:50   ` Yu Chen
2015-05-04 14:08 ` Rafael J. Wysocki
2015-05-04 14:26   ` Mike Snitzer
2015-05-04 21:26     ` Rafael J. Wysocki
2015-05-05  2:30     ` Yu Chen
2015-05-05 20:48       ` Rafael J. Wysocki
2015-05-06  2:01         ` Mike Snitzer
2015-05-06  2:59           ` Yu Chen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).