Re: [PATCH v1 1/1] lib/vsprintf: Check pointer before dereferencing in time_and_date()

From: Petr Mladek

Date: Wed Nov 12 2025 - 05:59:40 EST


On Mon 2025-11-10 14:21:18, Andy Shevchenko wrote:
> The pointer may be invalid when gets to the printf(). In particular
> the time_and_date() dereferencing it in some cases without checking.
>
> Move the check from rtc_str() to time_and_date() to cover all cases.
>
> Fixes: 7daac5b2fdf8 ("lib/vsprintf: Print time64_t in human readable format")
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>

JFYI, the patch has been comitted into printk/linux.git,
branch for-6.19.

Best Regards,
Petr