kern/109232: [sio][patch] ibufsize calculation wrong causing data
loss
Greg Ansley
gja at ansley.com
Fri Feb 16 15:20:09 UTC 2007
>Number: 109232
>Category: kern
>Synopsis: [sio][patch] ibufsize calculation wrong causing data loss
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Fri Feb 16 15:20:05 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator: Greg Ansley
>Release: 6.1-RELEASE
>Organization:
Ansley & Associates, Inc.
>Environment:
FreeBSD anakin.telecine.com 6.1-RELEASE-p2 FreeBSD 6.1-RELEASE-p2 #7: Mon Sep 25 13:20:44 EDT 2006 gja at anakin.telecine.com:/usr/src/sys/i386/compile/ANAKIN i386
>Description:
sio comwakeup time (sio_timeout) is limited to 200 hz (see siosettimeout()) but calculation for sio ibufsize uses hz which is now >> 200 hz causing insufficiently sized interrupt level sio buffers. This in turn causes lost incoming data and the kernel issues the "interrupt-level buffer overflow" message when receiving long strings of high speed (baud > 19200) data.
Probalby has bearing on kern/26261 although I don't know when hz was raised above 200.
>How-To-Repeat:
Open serial port at > 19200 baud and recieve long (> 128 bytes) of continuous full speed data.
>Fix:
Index: sio.c
sio.c:1929
Change:
cp4ticks = speed / 10 / hz * 4;
to
cp4ticks = speed / 10 / (hz > 200 ? 200 : hz) * 4;
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list