Re: [patch] small tty irq race fix

From: Nicolas Pitre (nico@cam.org)
Date: Mon Mar 03 2003 - 14:15:32 EST


On 3 Mar 2003, Alan Cox wrote:

>
> > fp = tty->flip.flag_buf + TTY_FLIPBUF_SIZE;
> > - tty->flip.buf_num = 0;
> >
> > local_irq_save(flags); // FIXME: is this safe?
> > + tty->flip.buf_num = 0;
>
> The other CPU can be touching these fields too surely. Its a
> useful note that the spinlocks need putting in the right spot
> but its still broken 8(

Well I only care about UP at the moment and the patch makes it right for UP
at least. Someone with his brain around the tty locking requirements can
look at replacing the local_irq_save() (there and elsewhere as well), which
is sort of a different issue.

Nicolas

-
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 : Fri Mar 07 2003 - 22:00:22 EST