From: "Kalugin, Evgeny" <evgeny.kalugin-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
To: "ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org"
<ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: "keescook-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org"
<keescook-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>,
"ccross-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org"
<ccross-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org>,
"Luck, Tony" <tony.luck-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
"linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"anton-9xeibp6oKSgdnm+yROfE0A@public.gmane.org"
<anton-9xeibp6oKSgdnm+yROfE0A@public.gmane.org>
Subject: Re: [PATCH] pstore: return error code (if any) from efi_pstore_write
Date: Tue, 14 Mar 2017 09:59:25 +0000 [thread overview]
Message-ID: <1489493144.11640.29.camel@evgeny-pc.tm.intel.com> (raw)
In-Reply-To: <CAKv+Gu92Lq62aJF4Ki2DU577xs09JWPLaOfRENRo=+VSyEBhVQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On Tue, 2017-03-14 at 08:24 +0000, Ard Biesheuvel wrote:
> On 13 March 2017 at 12:46, Kalugin, Evgeny <evgeny.kalugin@intel.com> wrote:
> > From 655a261d71af9de62e0e23ae0eb6f75037ae5e3e Mon Sep 17 00:00:00 2001
> > From: Evgeny Kalugin <evgeny.kalugin@intel.com>
> > 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@intel.com>
>
> 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
> >
next prev parent reply other threads:[~2017-03-14 9:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-13 12:46 [PATCH] pstore: return error code (if any) from efi_pstore_write Kalugin, Evgeny
[not found] ` <1489416765.32205.14.camel-HiM4UUiQNY10sU3rIFUpn1DQ4js95KgL@public.gmane.org>
2017-03-14 8:24 ` Ard Biesheuvel
[not found] ` <CAKv+Gu92Lq62aJF4Ki2DU577xs09JWPLaOfRENRo=+VSyEBhVQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-03-14 9:59 ` Kalugin, Evgeny [this message]
[not found] ` <1489493144.11640.29.camel-HiM4UUiQNY10sU3rIFUpn1DQ4js95KgL@public.gmane.org>
2017-03-17 22:52 ` Ard Biesheuvel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1489493144.11640.29.camel@evgeny-pc.tm.intel.com \
--to=evgeny.kalugin-ral2jqcrhueavxtiumwx3w@public.gmane.org \
--cc=anton-9xeibp6oKSgdnm+yROfE0A@public.gmane.org \
--cc=ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=ccross-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org \
--cc=keescook-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
--cc=linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=tony.luck-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox