[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <55cceaf8-acd4-22e2-61b5-99fff4ad5d75@igalia.com>
Date: Thu, 6 Oct 2022 20:34:44 -0300
From: "Guilherme G. Piccoli" <gpiccoli@...lia.com>
To: Kees Cook <keescook@...omium.org>
Cc: linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
kernel-dev@...lia.com, kernel@...ccoli.net, anton@...msg.org,
ccross@...roid.com, tony.luck@...el.com
Subject: Re: [PATCH 4/8] pstore: Alert on backend write error
On 06/10/2022 20:27, Kees Cook wrote:
> [...]
>> --- a/fs/pstore/platform.c
>> +++ b/fs/pstore/platform.c
>> @@ -463,6 +463,9 @@ static void pstore_dump(struct kmsg_dumper *dumper,
>> if (ret == 0 && reason == KMSG_DUMP_OOPS) {
>> pstore_new_entry = 1;
>> pstore_timer_kick();
>> + } else {
>> + pr_err_once("backend (%s) writing error (%d)\n",
>> + psinfo->name, ret);
>
> We're holding a spinlock here, so doing a pr_*() call isn't a great
> idea. It's kind of not a great idea to try to write to the log in the
> middle of a dump either, but we do attempt it at the start.
>
> Perhaps keep a saved_ret or something and send it after the spin lock is
> released?
>
Hi Kees, thanks a lot for the very quick review!!
Agree with you, I'll rework this one.
Do you agree with showing only a single error? For me makes sense since
we just wanna hint advanced users (+ people-debugging-pstore heh) that
something went wrong.
Cheers,
Guilherme
Powered by blists - more mailing lists