Re: [PATCH] Repeatable kernel crash in tty_io.c (2.5.73 & 2.4.21)

From: $B5HF#1QL@(
Date: Thu Jun 26 2003 - 11:26:12 EST


In article <20030627001520.5237.INOUEH@uranus.dti.ne.jp> (at Fri, 27 Jun 2003 01:17:37 +0900), Hiroshi Inoue <inoueh@uranus.dti.ne.jp> says:

> o_tty->driver->refcount--;
> - file_list_lock();
> - list_del(&o_tty->tty_files);
> - file_list_unlock();
> + if (o_tty->tty_files.next != &o_tty->tty_files) {
> + file_list_lock();
> + list_del(&o_tty->tty_files);
> + file_list_unlock();
> + }
> free_tty_struct(o_tty);

I'm not familiar with this area, however,
we should test o_tty->tty_files.next != &o_tty->tty_files
under the lock, shouldn't we?

file_list_lock(o_tty)
if (o_tty->tty_files.next != &o_tty->tty_files)
    list_del(&o_tty->tty_files);
file_list_unlock(o_tty);

-- 
Hideaki YOSHIFUJI @ USAGI Project <yoshfuji@linux-ipv6.org>
GPG FP: 9022 65EB 1ECF 3AD1 0BDF  80D8 4807 F894 E062 0EEA
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Jun 30 2003 - 22:00:24 EST