1. 21 6月, 2006 1 次提交
  2. 12 6月, 2006 1 次提交
    • P
      [PATCH] Fix for the PPTP hangs that have been reported · 289a1e99
      Paul Mackerras 提交于
      People have been reporting that PPP connections over ptys, such as
      used with PPTP, will hang randomly when transferring large amounts of
      data, for instance in http://bugzilla.kernel.org/show_bug.cgi?id=6530.
      I have managed to reproduce the problem, and the patch below fixes the
      actual cause.
      
      The problem is not in fact in ppp_async.c but in n_tty.c.  What
      happens is that when pptp reads from the pty, we call read_chan() in
      drivers/char/n_tty.c on the master side of the pty.  That copies all
      the characters out of its buffer to userspace and then calls
      check_unthrottle(), which calls the pty unthrottle routine, which
      calls tty_wakeup on the slave side, which calls ppp_asynctty_wakeup,
      which calls tasklet_schedule.  So far so good.  Since we are in
      process context, the tasklet runs immediately and calls
      ppp_async_process(), which calls ppp_async_push, which calls the
      tty->driver->write function to send some more output.
      
      However, tty->driver->write() returns zero, because the master
      tty->receive_room is still zero.  We haven't returned from
      check_unthrottle() yet, and read_chan() only updates tty->receive_room
      _after_ calling check_unthrottle.  That means that the driver->write
      call in ppp_async_process() returns 0.  That would be fine if we were
      going to get a subsequent wakeup call, but we aren't (we just had it,
      and the buffer is now empty).
      
      The solution is for n_tty.c to update tty->receive_room _before_
      calling the driver unthrottle routine.  The patch below does this.
      With this patch I was able to transfer a 900MB file over a PPTP
      connection (taking about 25 minutes), whereas without the patch the
      connection would always stall in under a minute.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      289a1e99
  3. 11 6月, 2006 1 次提交
  4. 02 6月, 2006 1 次提交
  5. 01 6月, 2006 4 次提交
  6. 27 5月, 2006 1 次提交
  7. 24 5月, 2006 1 次提交
  8. 23 5月, 2006 1 次提交
  9. 22 5月, 2006 2 次提交
  10. 16 5月, 2006 7 次提交
  11. 11 5月, 2006 1 次提交
  12. 02 5月, 2006 1 次提交
  13. 28 4月, 2006 2 次提交
  14. 26 4月, 2006 2 次提交
  15. 23 4月, 2006 14 次提交