Re: [Regression] kdesu broken

From: OGAWA Hirofumi
Date: Mon Jul 27 2009 - 08:07:42 EST


Alan Cox <alan@xxxxxxxxxxxxxxxxxxx> writes:

>> I see. It sounds like good thing. The attached patch or something?
>> Anyway, I'm not familiar with the tty stuff obviously, so, I'm not sure
>> whether this patch is right or not.
>
> It turns out to be a little bit trickier than I thought because of open
> v close v flush_to_ldisc races (some of the open/close ones being long
> standing).
>
> We now use tty->buf.lock to keep EOF/EOFPENDING/OTHER_CLOSED all in order
> together. That has no real cost as we already hold the buf.lock in the hot
> path which is flush_to_ldisc.
>
> Anyway this is my current thoughts (not yet given a testing)

I see. Looks like clean to me.

> + spin_lock_irqsave(&pair->buf.lock, flags);
> + pair->packet = 0;

I worried "pair->packet = 0" when I'm thinking this. I guess it would be
changed more early than before. Is it ok?

Thanks.
--
OGAWA Hirofumi <hirofumi@xxxxxxxxxxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/