Re: [PATCH 1/1] rcutorture: fixes for printing message buffer

From: Pranith Kumar
Date: Fri Jul 11 2014 - 17:09:46 EST

On Fri, Jul 11, 2014 at 4:37 PM, Joe Perches <joe@xxxxxxxxxxx> wrote:
> On Fri, 2014-07-11 at 16:30 -0400, Pranith Kumar wrote:
>> Use snprintf() instead of sprintf() for writing to the message buffer.
>> Also use vmalloc() for the allocation of the message buffer. Since pr_alert() is
>> limited to print LOG_LINE_MAX characters at a time, we print the buffer in a
>> loop one line at a time.
>> I tested this using the script as follows:
> Did you see the patch I sent you?
> It doesn't need a vmalloc.
> What is wrong with that approach?

I was trying to stay as close to the original code as possible by
using a buffer instead of using pr_alert/pr_cont throughout the code.

I see nothing wrong with what you proposed, but I like having one
pr_alert instead of lots sprinkled. Also avoiding vmalloc/vfree using
your approach seems like a win.

I will let Paul decide.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at