lkml.org 
[lkml]   [2023]   [Mar]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] init/initramfs: Fix argument forwarding to panic() in panic_show_mem()
From
Date
On Tue, 2023-03-21 at 10:05 +1100, Benjamin Gray wrote:
> Forwarding variadic argument lists can't be done by passing a va_list
> to a function with signature foo(...) (as panic() has). It ends up
> interpreting the va_list itself as a single argument instead of
> iterating it. printf() happily accepts it of course, leading to
> corrupt
> output.
>
> Convert panic_show_mem() to a macro to allow forwarding the
> arguments.
> The function is trivial enough that it's easier than trying to
> introduce
> a vpanic() variant.
>
> Signed-off-by: Benjamin Gray <bgray@linux.ibm.com>

Reviewed-by: Andrew Donnellan <ajd@linux.ibm.com>

--
Andrew Donnellan OzLabs, ADL Canberra
ajd@linux.ibm.com IBM Australia Limited

\
 
 \ /
  Last update: 2023-03-27 01:11    [W:0.139 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site