Re: PPP is not SMP safe in 2.2.X (fix)

From: Fabrice Bellet (Fabrice.Bellet@creatis.insa-lyon.fr)
Date: Mon Feb 21 2000 - 18:53:59 EST


On Mon, Feb 21, 2000 at 12:05:13PM +0000, Alan Cox wrote:
>
> Getting a bad frame from the pty under high load is certainly legal anyway.
> If your xDSL link crashes you have another problem that is bigger to worry
> about,.,.

I must have misexplained myself. I mean that my xDSL link gets down due
to too many bad frames, as soon as the first bad one occurs. BTW, SyncPPP
is more robust.

I would accept that I could catch bad frames due to high load, but
actually this only occurs in SMP, which makes me think It could be
a SMP race condition.

I tracked down the bug a little deeper tonight. Frames are correctly
emitted at the beginning of ppp_send_frame() [by checking their
sequence number : a given frame was given to ppp_send_frame() but
never arrived to the pty on the client side],
but I couldn't find a way to do the same check
in ppp_tty_push() : the syslog couldn't handle the debug msg rate :-)
Protecting ppp_tty_push() didn't help.

I also tried to increase the output buffer size (OBUFSIZE, default to 256)
so a 1500 bytes frame can fit into after control chars being
escaped, and the bug vanished this way.

I also confirm that the line :
         kfree_sbk(ppp->tpkt);
        ppp->tpkt=0;
at the end of ppp_async_encode() causes a oops in SMP.

Fabrice

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Feb 23 2000 - 21:00:29 EST