Re: [PATCH printk v2 2/2] printk_ringbuffer: Add sanity check for 0-size data

From: Petr Mladek

Date: Fri Mar 27 2026 - 12:10:01 EST


On Thu 2026-03-26 14:44:02, John Ogness wrote:
> get_data() has a sanity check for regular data blocks to ensure at
> least space for the ID exists. But a regular block should also have
> at least 1 byte of data (otherwise it would be data-less instead of
> regular).
>
> Expand the get_data() block size sanity check to additionally expect
> at least 1 byte of data.
>
> Signed-off-by: John Ogness <john.ogness@xxxxxxxxxxxxx>

Looks good to me. It complements the 1st patch.

Reviewed-by: Petr Mladek <pmladek@xxxxxxxx>
Tested-by: Petr Mladek <pmladek@xxxxxxxx>

Best Regards,
Petr