lkml.org 
[lkml]   [2022]   [Sep]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH printk 06/18] printk: Protect [un]register_console() with a mutex
    On (22/09/24 02:10), John Ogness wrote:
    > From: Thomas Gleixner <tglx@linutronix.de>
    >
    > Unprotected list walks are a brilliant idea. Especially in the context of
    > hotpluggable consoles.
    >
    > The new list lock provides not only synchronization for console list
    > manipulation, but also for manipulation of console->flags:
    >
    > console_list_lock();
    > console_lock();
    >
    > /* may now manipulate the console list and/or console->flags */
    >
    > console_unlock();
    > console_list_unlock();
    >
    > Therefore it is safe to iterate the console list and read console->flags
    > if holding either the console lock or the console list lock.
    >
    > Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    > Signed-off-by: John Ogness <john.ogness@linutronix.de>

    Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org>

    \
     
     \ /
      Last update: 2022-09-24 11:33    [W:4.195 / U:0.072 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site