NetBSD Problem Report #43179

From www@NetBSD.org  Mon Apr 19 13:05:09 2010
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id ECB3B63B8BC
	for <gnats-bugs@gnats.NetBSD.org>; Mon, 19 Apr 2010 13:05:08 +0000 (UTC)
Message-Id: <20100419130508.8837163B873@www.NetBSD.org>
Date: Mon, 19 Apr 2010 13:05:08 +0000 (UTC)
From: oshima-ya@yagoto-urayama.jp
Reply-To: oshima-ya@yagoto-urayama.jp
To: gnats-bugs@NetBSD.org
Subject: Strange input control of telnet LINEMODE in current (TIOCPKT_IOCTL does not work)
X-Send-Pr-Version: www-1.0

>Number:         43179
>Category:       kern
>Synopsis:       Strange input control of telnet LINEMODE in current (TIOCPKT_IOCTL does not work)
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Apr 19 13:10:00 +0000 2010
>Originator:     Yasushi Oshima
>Release:        NetBSD 5.99.27
>Organization:
>Environment:
NetBSD amd64 5.99.27 NetBSD 5.99.27 (GENERIC) #4: Mon Apr 19 20:55:39 JST 2010
oshima@amd64:/usr/src/sys/arch/amd64/compile/GENERIC amd64

>Description:
When I run vi(1) on a telnet session, edit-control does not effect immediately
till 'Enter-Key' input like 'half-duplex'.
In top(1), 'q' is also the same till 'Enter'.

In character mode on telnet, this does not occur.

This occurs after sys/kern/tty_pty.c rev.1.118.

>How-To-Repeat:
1. Enable telnetd, and login by telnet to NetBSD system.
2. Run vi(1) and input any key in edit-mode.
3. Run top(1), and input 'q'.

>Fix:
Because tty_pty.c rev.1.118 will clear pti->pt_send  first, the code 
of checking TIOCPKT_IOCTL flag allows always false.

This should use the preserved value (c).

--- sys/kern/tty_pty.c   24 Jan 2010 19:56:26 -0000      1.121
+++ sys/kern/tty_pty.c   19 Apr 2010 12:45:06 -0000
@@ -615,7 +615,7 @@
                                 * relevant only if the tty got closed and then
                                 * opened again while we were out uiomoving.
                                 */
-                               if (pti->pt_send & TIOCPKT_IOCTL) {
+                               if (c & TIOCPKT_IOCTL) {
                                        cc = min(uio->uio_resid,
                                                sizeof(tp->t_termios));
                                        uiomove((void *) &tp->t_termios,

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.