pstore: return error code (if any) from efi_pstore_write
Subsystems (2)
PATCH 1/1 pstore: return error code (if any) from efi_pstore_write
From 655a261d71af9de62e0e23ae0eb6f75037ae5e3e Mon Sep 17 00:00:00 2001
From: Evgeny Kalugin <[email protected]>
Date: Tue, 7 Mar 2017 14:22:25 +0000
Subject: [PATCH] pstore: return error code (if any) from efi_pstore_write
For some reason return value from actual variable setting was ignored. With this change error code get transferred upwards through call stack.
--- drivers/firmware/efi/efi-pstore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/firmware/efi/efi-pstore.c +1 -1
@@ -274,7 +274,7 @@ static int efi_pstore_write(enum pstore_type_id type,for (i =0 ; i <DUMP_NAME_LEN ; i++) efi_name[i] = name[i]; -efivar_entry_set_safe (efi_name, vendor,PSTORE_EFI_ATTRIBUTES , + ret =efivar_entry_set_safe (efi_name, vendor,PSTORE_EFI_ATTRIBUTES , !pstore_cannot_block_path (reason), size, psi->buf);
Signature · 12 lines
1.9.1 --------------------------------------------------------------------- Intel Finland Oy Registered Address: PL 281, 00181 Helsinki Business Identity Code: 0357606 - 4 Domiciled in Helsinki This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
A message that is not in the archive (sent off-list or not yet received): 1489416765.32205.14.camel-HiM4UUiQNY10sU3rIFUpn1DQ4js95KgL@public.gmane.org
Quoted 9 lines · Evgeny
From
655a261d71af9de62e0e23ae0eb6f75037ae5e3eMon Sep 17 00:00:00 2001
From: Evgeny Kalugin <[email protected]>
Date: Tue, 7 Mar 2017 14:22:25 +0000
Subject: [PATCH] pstore: return error code (if any) fromefi_pstore_writeFor some reason return value from actual variable setting was ignored. With this change error code get transferred upwards through call stack.
Signed-off-by Evgeny Kalugin <[email protected]>
Thanks for the patch.
Could you give a bit more detail on how this broke things for you?
Quoted 30 lines
--- drivers/firmware/efi/efi-pstore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/firmware/efi/efi-pstore.c +1
-2@@ -274,7 +274,7 @@ static int efi_pstore_write(enum pstore_type_id type,for (i =0 ; i <DUMP_NAME_LEN ; i++) efi_name[i] = name[i]; -efivar_entry_set_safe (efi_name, vendor,PSTORE_EFI_ATTRIBUTES , + ret =efivar_entry_set_safe (efi_name, vendor,PSTORE_EFI_ATTRIBUTES , !pstore_cannot_block_path (reason), size, psi->buf); --1.9.1
---------------------------------------------------------------------
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki
Business Identity Code: 0357606 - 4
Domiciled in HelsinkiThis e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
A message that is not in the archive (sent off-list or not yet received): CAKv+Gu92Lq62aJF4Ki2DU577xs09JWPLaOfRENRo=+VSyEBhVQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Quoted 6 lines · Ard Biesheuvel
Quoted 5 lines · Evgeny
From
655a261d71af9de62e0e23ae0eb6f75037ae5e3eMon Sep 17 00:00:00 2001
From: Evgeny Kalugin <[email protected]>
Date: Tue, 7 Mar 2017 14:22:25 +0000
Subject: [PATCH] pstore: return error code (if any) fromefi_pstore_write
Quoted 8 lines
Quoted 4 lines
For some reason return value from actual variable setting was ignored. With this change error code get transferred upwards through call stack.
Signed-off-by Evgeny Kalugin <[email protected]>Thanks for the patch.
Could you give a bit more detail on how this broke things for you?
Well, it haven't broken much things for me yet. I just found it when tried to debug one problem in efi-pstore. There I was about to watch return value from write call, when noticed that it is always zero and that has not so much sense obviously.
Quoted 21 lines
Quoted 21 lines
--- drivers/firmware/efi/efi-pstore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/firmware/efi/efi-pstore.c +1
-2@@ -274,7 +274,7 @@ static int efi_pstore_write(enum pstore_type_id type,for (i =0 ; i <DUMP_NAME_LEN ; i++) efi_name[i] = name[i]; -efivar_entry_set_safe (efi_name, vendor,PSTORE_EFI_ATTRIBUTES , + ret =efivar_entry_set_safe (efi_name, vendor,PSTORE_EFI_ATTRIBUTES , !pstore_cannot_block_path (reason), size, psi->buf); --1.9.1
A message that is not in the archive (sent off-list or not yet received): 1489493144.11640.29.camel-HiM4UUiQNY10sU3rIFUpn1DQ4js95KgL@public.gmane.org
Ard Biesheuvel
AppliedQuoted 12 lines · Evgeny
Quoted 11 lines · Ard Biesheuvel
Quoted 9 lines · Evgeny
From
655a261d71af9de62e0e23ae0eb6f75037ae5e3eMon Sep 17 00:00:00 2001
From: Evgeny Kalugin <[email protected]>
Date: Tue, 7 Mar 2017 14:22:25 +0000
Subject: [PATCH] pstore: return error code (if any) fromefi_pstore_writeFor some reason return value from actual variable setting was ignored. With this change error code get transferred upwards through call stack.
Signed-off-by Evgeny Kalugin <[email protected]>
Quoted 9 lines
Quoted 3 lines
Thanks for the patch.
Could you give a bit more detail on how this broke things for you?
Well, it haven't broken much things for me yet. I just found it when tried to debug one problem in efi-pstore. There I was about to watch return value from write call, when noticed that it is always zero and that has not so much sense obviously.
Queued for v4.12, thanks