Unprotected list walks are not necessarily safe.
Signed-off-by: Thomas Gleixner <[email protected]>
---
drivers/tty/serial/kgdboc.c | 2 ++
1 file changed, 2 insertions(+)
--- a/drivers/tty/serial/kgdboc.c
+++ b/drivers/tty/serial/kgdboc.c
@@ -193,6 +193,7 @@ static int configure_kgdboc(void)
if (!p)
goto noconfig;
+ console_lock();
for_each_console(cons) {
int idx;
if (cons->device && cons->device(cons, &idx) == p &&
@@ -201,6 +202,7 @@ static int configure_kgdboc(void)
break;
}
}
+ console_unlock();
kgdb_tty_driver = p;
kgdb_tty_line = tty_line;
On (22/09/11 00:27), Thomas Gleixner wrote:
>
> Unprotected list walks are not necessarily safe.
>
> Signed-off-by: Thomas Gleixner <[email protected]>
For what it's worth
Reviewed-by: Sergey Senozhatsky <[email protected]>