kern/118287: [kernel] [patch] tty write is not always atomic for small lines

Ed Schouten ed at 80386.nl
Tue Feb 10 10:40:03 PST 2009


The following reply was made to PR kern/118287; it has been noted by GNATS.

From: Ed Schouten <ed at 80386.nl>
To: bug-followup at FreeBSD.org, chardin at 2wire.com
Cc: rwatson at FreeBSD.org
Subject: Re: kern/118287: [kernel] [patch] tty write is not always atomic
	for small lines
Date: Tue, 10 Feb 2009 19:32:17 +0100

 --RwGu8mu1E+uYXPWP
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 Hello Charles,
 
 Robert Watson poked me to take a look at this PR. Unfortunately the new
 TTY layer still has the same `guarantees', so this problem still exists.
 The fix you proposed sounds pretty good in theory, but as you mentioned,
 it only solves a certain class of races. The problem is that output
 processing may cause data to grow 8 times, because of tab expansion.
 
 What's your opinion on this patch?
 
 	http://80386.nl/pub/tty-sync.diff
 
 It adds synchronisation to the call to ttydisc_write(), which should be
 pretty solid. Because I want to keep non-blocking writes as they are
 now, they can still cause data to get mangled, but I guess this is
 already pretty good.
 
 --=20
  Ed Schouten <ed at 80386.nl>
  WWW: http://80386.nl/
 
 --RwGu8mu1E+uYXPWP
 Content-Type: application/pgp-signature
 Content-Disposition: inline
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.9 (FreeBSD)
 
 iEYEARECAAYFAkmRyDEACgkQ52SDGA2eCwVscwCfSvYGx0aC4aVouf1frP3QaqHf
 GIIAn33vIUgCYz6twqtdnBq/GbiAKLbQ
 =nknL
 -----END PGP SIGNATURE-----
 
 --RwGu8mu1E+uYXPWP--


More information about the freebsd-bugs mailing list