lkml.org 
[lkml]   [2003]   [Feb]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject[Bug 420] New: Divide by zero (/proc/sys/net/ipv4/neigh/DEV/base_reachable_time)
http://bugme.osdl.org/show_bug.cgi?id=420

Summary: Divide by zero
(/proc/sys/net/ipv4/neigh/DEV/base_reachable_time)
Kernel Version: 2.4.20, 2.5.63
Status: NEW
Severity: normal
Owner: davem@vger.kernel.org
Submitter: usui_mi@ybb.ne.jp


Distribution:Debian GNU/Linux 3.0, Vine Linux 2.6
Hardware Environment:
Software Environment:
Problem Description:
Divide by zero (/proc/sys/net/ipv4/neigh/DEV/base_reachable_time)
Steps to reproduce:
I found the problem of neigh_rand_reach_time() in net/core/neighbour.c.
This function called by neigh_periodic_timer() each 300 seconds,
and argument of neigh_periodic_timer() is p->base_reachable_time.
base_reachable_time can set to 0 by below sequence.

echo 0 > /proc/sys/net/ipv4/neigh/DEV/base_reachable_time

But neigh_rand_reach_time() divide by its argument.

unsigned long neigh_rand_reach_time(unsigned long base)
{
return (net_random() % base) + (base>>1);
}


-
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:33    [W:0.026 / U:7.512 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site