Re: [PATCH] pstore: return error code (if any) from efi_pstore_write

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2017-03-14 at 08:24 +0000, Ard Biesheuvel wrote:
> On 13 March 2017 at 12:46, Kalugin, Evgeny <evgeny.kalugin@xxxxxxxxx> wrote:
> > From 655a261d71af9de62e0e23ae0eb6f75037ae5e3e Mon Sep 17 00:00:00 2001
> > From: Evgeny Kalugin <evgeny.kalugin@xxxxxxxxx>
> > 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.
> >
> > Signed-off-by: Evgeny Kalugin <evgeny.kalugin@xxxxxxxxx>
> 
> 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.

> 
> > ---
> >  drivers/firmware/efi/efi-pstore.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/firmware/efi/efi-pstore.c b/drivers/firmware/efi/efi-pstore.c
> > index f402ba2..2ea808e 100644
> > --- a/drivers/firmware/efi/efi-pstore.c
> > +++ b/drivers/firmware/efi/efi-pstore.c
> > @@ -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
> >

��.n��������+%������w��{.n�����{����*jg��������ݢj����G�������j:+v���w�m������w�������h�����٥




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux