Re: [PATCH] pstore: gracefully handle NULL pstore_info functions

From: Kees Cook
Date: Thu Nov 17 2011 - 14:37:54 EST


On Thu, Nov 17, 2011 at 11:13 AM, Tony Luck <tony.luck@xxxxxxxxx> wrote:
> On Thu, Nov 17, 2011 at 10:42 AM, Kees Cook <keescook@xxxxxxxxxxxx> wrote:
>> -       kmsg_dump_register(&pstore_dumper);
>> +       if (psi->write && psi->buf && psi->bufsize)
>> +               kmsg_dump_register(&pstore_dumper);
>
> I can see that you might not need the other parts of the pstore
> interface if your back-end is very simple (e.g. only has space for a
> single record). But stub functions are cheap - so it isn't clear who
> should pay the overhead.

Okay, fine by me. :) I'll resend with just the open/read/close/erase checked.

-Kees

--
Kees Cook
ChromeOS Security
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/