netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [2.6.0, pktgen] divide-by-zero
@ 2003-12-31 11:13 Lennert Buytenhek
  2004-01-18 15:48 ` [PATCH] " Jörn Engel
  0 siblings, 1 reply; 4+ messages in thread
From: Lennert Buytenhek @ 2003-12-31 11:13 UTC (permalink / raw)
  To: linux-kernel; +Cc: netdev

Hi,

When generating packets with pktgen with count=10, I get a divide-by-zero
oops in inject().

Line 273 in net/core/pktgen.c seems unsafe:
	__u64 pps = (__u32)(info->sofar * 1000) / ((__u32)(total) / 1000);

What if total < 1000 ?


cheers,
Lennert

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-01-19 17:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-12-31 11:13 [2.6.0, pktgen] divide-by-zero Lennert Buytenhek
2004-01-18 15:48 ` [PATCH] " Jörn Engel
2004-01-18 23:15   ` Robert Olsson
2004-01-19 17:24     ` David S. Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).