lkml.org 
[lkml]   [2003]   [Dec]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
Subject[2.6.0, pktgen] divide-by-zero
From
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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:59    [W:0.035 / U:0.920 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site