]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
ppp: Fix throttling bugs
authorAlan Cox <alan@linux.intel.com>
Mon, 22 Jun 2009 17:42:29 +0000 (18:42 +0100)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 22 Jun 2009 18:32:24 +0000 (11:32 -0700)
The ppp layer goes around calling the unthrottle method from non sleeping
paths. This isn't safe because the unthrottle methods in the tty layer need
to be able to sleep (consider a USB dongle).

Until now this didn't show up because the ppp layer never actually throttled
a port so the unthrottle was always a no-op. Currently it's a mutex taking
path so warnings are spewed if the unthrottle occurs via certain paths.

Fix this by removing the unneccessary unthrottle calls.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/net/ppp_async.c
drivers/net/ppp_synctty.c

index 6de8399d6dd92d26875cca679ec332c19082d736..17c116bb332c7e0c41da3f97aeb3ac3755097e87 100644 (file)
@@ -356,7 +356,6 @@ ppp_asynctty_receive(struct tty_struct *tty, const unsigned char *buf,
        if (!skb_queue_empty(&ap->rqueue))
                tasklet_schedule(&ap->tsk);
        ap_put(ap);
-       tty_unthrottle(tty);
 }
 
 static void
index d2fa2db1358633771439013546758654444c6a00..aa3d39f38e2257deee5e72e9df06453be96e3046 100644 (file)
@@ -397,7 +397,6 @@ ppp_sync_receive(struct tty_struct *tty, const unsigned char *buf,
        if (!skb_queue_empty(&ap->rqueue))
                tasklet_schedule(&ap->tsk);
        sp_put(ap);
-       tty_unthrottle(tty);
 }
 
 static void