lkml.org 
[lkml]   [2022]   [May]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [next] i386: kunit: ASSERTION FAILED at mm/kfence/kfence_test.c:547
Date
On 2022-05-02, Petr Mladek <pmladek@suse.com> wrote:
>> My proposal would be to fix the tracepoint like so:
>>
>> | --- a/kernel/printk/printk.c
>> | +++ b/kernel/printk/printk.c
>> | @@ -2002,8 +2002,6 @@ static void call_console_driver(struct console *con, const char *text, size_t le
>> | {
>> | size_t dropped_len;
>> |
>> | - trace_console_rcuidle(text, len);
>> | -
>> | if (con->dropped && dropped_text) {
>> | dropped_len = snprintf(dropped_text, DROPPED_TEXT_MAX,
>> | "** %lu printk messages dropped **\n",
>> | @@ -2178,6 +2176,8 @@ static u16 printk_sprint(char *text, u16 size, int facility,
>> | }
>> | }
>> |
>> | + trace_console_rcuidle(text, text_len);
>> | +
>> | return text_len;
>> | }
>>
>> This fixes the KFENCE and KCSAN tests.
>>
>> Unless I hear objections, I'll prepare a patch explaining why we need to
>> fix the tracepoint.
>
> It makes perfect sense to me.

This is the easiest place for it. However, it should be clear that in
the context of trace_console_rcuidle(), the message is not yet visible
to any readers. The message _will_ get committed and definitely _will_
become visible at some point. But it is not (yet) visible at _this_
point. Maybe that is OK for what it is being used for.

If trace_console_rcuidle() must be called at the point of visibility for
readers, it becomes more complicated.

John

\
 
 \ /
  Last update: 2022-05-02 11:21    [W:0.062 / U:0.632 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site