Date: Fri, 23 Jul 1999 13:38:03 -0700 From: John-Mark Gurney <gurney_j@efn.org> To: Poul-Henning Kamp <phk@critter.freebsd.dk> Cc: bright@rush.net, freebsd-bugs@FreeBSD.ORG Subject: Re: kern/12780: tun code panics when 0 bytes written (PATCH included) Message-ID: <19990723133803.42096@hydrogen.fircrest.net> In-Reply-To: <39283.932761013@critter.freebsd.dk>; from Poul-Henning Kamp on Fri, Jul 23, 1999 at 10:16:53PM %2B0200 References: <199907232009.NAA91328@freefall.freebsd.org> <39283.932761013@critter.freebsd.dk>
index | next in thread | previous in thread | raw e-mail
Poul-Henning Kamp scribbled this message on Jul 23:
> Zero length writes to a device are legal, at some point it was the
> way to write end of file and end of tape for magtapes: you would
> do one zero length write after each file and two at the end of the
> tape.
yes, but this prevents tun from panicing BECAUSE of a zero length
write, this does not effect the device subsystem in any way... read
the code... the only other patch for this bug is to change the:
if (error) {
if (top) {
to:
if (error || top) {
and I decided that it was best to check and not try to allocate an mbuf
when we know we are just going to free it in a few lines of code..
read the code and the patch...
--
John-Mark Gurney Voice: +1 541 684 8449
Cu Networking P.O. Box 5693, 97405
"The soul contains in itself the event that shall presently befall it.
The event is only the actualizing of its thought." -- Ralph Waldo Emerson
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990723133803.42096>
