All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kexec-tools: print error if kexec_file_load fails
@ 2022-03-16 10:33 Hari Bathini
  2022-03-16 11:56 ` Petr Tesarik
  0 siblings, 1 reply; 3+ messages in thread
From: Hari Bathini @ 2022-03-16 10:33 UTC (permalink / raw)
  To: kexec

Commit 4f77da634035 ("kexec-tools: Fix kexec_file_load(2) error
handling") introduced EFALLBACK for scenarios where fallbacking back
to kexec_load syscall is likely to work and dropped printing error
message for these scenarios. But printing error message for other
failure scenarios was inadvertently dropped. Restore printing error
message for such cases.

Fixes: 4f77da634035 ("kexec-tools: Fix kexec_file_load(2) error handling")
Cc: Petr Tesarik <ptesarik@suse.com>
Reported-by: Nageswara R Sastry <rnsastry@linux.ibm.com>
Tested-by: Nageswara R Sastry <rnsastry@linux.ibm.com>
Signed-off-by: Hari Bathini <hbathini@linux.ibm.com>
---
 kexec/kexec.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/kexec/kexec.c b/kexec/kexec.c
index 7e4787b..865de61 100644
--- a/kexec/kexec.c
+++ b/kexec/kexec.c
@@ -1339,6 +1339,7 @@ static int do_kexec_file_load(int fileind, int argc, char **argv,
 		case EMSGSIZE:
 			/* Reject by default. */
 		default:
+			fprintf(stderr, "kexec_file_load failed: %s\n", strerror(errno));
 			ret = EFAILED;
 			break;
 
-- 
2.35.1



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

* [PATCH] kexec-tools: print error if kexec_file_load fails
  2022-03-16 10:33 [PATCH] kexec-tools: print error if kexec_file_load fails Hari Bathini
@ 2022-03-16 11:56 ` Petr Tesarik
  2022-03-23 14:20   ` Simon Horman
  0 siblings, 1 reply; 3+ messages in thread
From: Petr Tesarik @ 2022-03-16 11:56 UTC (permalink / raw)
  To: kexec

Hi Hari,

Dne 16. 03. 22 v 11:33 Hari Bathini napsal(a):
> Commit 4f77da634035 ("kexec-tools: Fix kexec_file_load(2) error
> handling") introduced EFALLBACK for scenarios where fallbacking back
> to kexec_load syscall is likely to work and dropped printing error
> message for these scenarios. But printing error message for other
> failure scenarios was inadvertently dropped. Restore printing error
> message for such cases.

Indeed, my commit removed the error messages on failure.

> 
> Fixes: 4f77da634035 ("kexec-tools: Fix kexec_file_load(2) error handling")
> Cc: Petr Tesarik <ptesarik@suse.com>
> Reported-by: Nageswara R Sastry <rnsastry@linux.ibm.com>
> Tested-by: Nageswara R Sastry <rnsastry@linux.ibm.com>
> Signed-off-by: Hari Bathini <hbathini@linux.ibm.com>

Reviewed-by: Petr Tesarik <ptesarik@suse.com>

Petr T

> ---
>   kexec/kexec.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/kexec/kexec.c b/kexec/kexec.c
> index 7e4787b..865de61 100644
> --- a/kexec/kexec.c
> +++ b/kexec/kexec.c
> @@ -1339,6 +1339,7 @@ static int do_kexec_file_load(int fileind, int argc, char **argv,
>   		case EMSGSIZE:
>   			/* Reject by default. */
>   		default:
> +			fprintf(stderr, "kexec_file_load failed: %s\n", strerror(errno));
>   			ret = EFAILED;
>   			break;
>   
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_0xAA503BC9AE0F47A7.asc
Type: application/pgp-keys
Size: 18487 bytes
Desc: OpenPGP public key
URL: <http://lists.infradead.org/pipermail/kexec/attachments/20220316/06bb02e3/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 495 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/kexec/attachments/20220316/06bb02e3/attachment-0001.sig>

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

* [PATCH] kexec-tools: print error if kexec_file_load fails
  2022-03-16 11:56 ` Petr Tesarik
@ 2022-03-23 14:20   ` Simon Horman
  0 siblings, 0 replies; 3+ messages in thread
From: Simon Horman @ 2022-03-23 14:20 UTC (permalink / raw)
  To: kexec

On Wed, Mar 16, 2022 at 12:56:03PM +0100, Petr Tesarik wrote:
> Hi Hari,
> 
> Dne 16. 03. 22 v 11:33 Hari Bathini napsal(a):
> > Commit 4f77da634035 ("kexec-tools: Fix kexec_file_load(2) error
> > handling") introduced EFALLBACK for scenarios where fallbacking back
> > to kexec_load syscall is likely to work and dropped printing error
> > message for these scenarios. But printing error message for other
> > failure scenarios was inadvertently dropped. Restore printing error
> > message for such cases.
> 
> Indeed, my commit removed the error messages on failure.
> 
> > 
> > Fixes: 4f77da634035 ("kexec-tools: Fix kexec_file_load(2) error handling")
> > Cc: Petr Tesarik <ptesarik@suse.com>
> > Reported-by: Nageswara R Sastry <rnsastry@linux.ibm.com>
> > Tested-by: Nageswara R Sastry <rnsastry@linux.ibm.com>
> > Signed-off-by: Hari Bathini <hbathini@linux.ibm.com>
> 
> Reviewed-by: Petr Tesarik <ptesarik@suse.com>

Thanks, applied.


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

end of thread, other threads:[~2022-03-23 14:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-16 10:33 [PATCH] kexec-tools: print error if kexec_file_load fails Hari Bathini
2022-03-16 11:56 ` Petr Tesarik
2022-03-23 14:20   ` Simon Horman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.