Subject: Re: kern/34674: Panic in tcp_input() by integer division fault
To: None <dbj@NetBSD.org, gnats-admin@netbsd.org, netbsd-bugs@netbsd.org,>
From: Christian Biere <christianbiere@gmx.de>
List: netbsd-bugs
Date: 10/01/2006 16:00:06
The following reply was made to PR kern/34674; it has been noted by GNATS.
From: Christian Biere <christianbiere@gmx.de>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: kern/34674: Panic in tcp_input() by integer division fault
Date: Sun, 1 Oct 2006 17:56:56 +0200
Christian Biere wrote:
> Michael van Elst wrote:
> > *txsegsizep = min((so->so_snd.sb_hiwat -
> > so->so_snd.sb_lowat + 1) >> 1, *txsegsizep);
> As hiwat is guaranteed to be equal or larger than lowat, I guess changing
> the "+ 2" should fix this because ">> 1" can never gain zero then. I'll
> try this.
This prevents the division-by-zero but still causes the other panic in
m_copydata() from tcp_output() as before. Apparently "*txsegsizep"
must not cross a certain minimum threshold.
--
Christian