> 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/