lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <482F3DF6.7080403@nuovasystems.com>
Date:	Sat, 17 May 2008 13:20:06 -0700
From:	Joe Eykholt <jre@...vasystems.com>
To:	Nicolas 2P <nicolas.2p.debian@...e.fr>
CC:	Jay Vosburgh <fubar@...ibm.com>,
	David Miller <davem@...emloft.net>,
	bonding-devel@...ts.sourceforge.net, linux-net@...r.kernel.org,
	linux-kernel@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [patch]  bondig - arp_interval with low value => Oops.

Nicolas 2P wrote:
> When setting arp_interval parameter to a very low value, delta_in_ticks 
> for next arp might become 0, causing an infinite loop.
> 
> See http://bugzilla.kernel.org/show_bug.cgi?id=10680
> 
> Same problem for miimon parameter already fixed, but fix might be 
> enhanced, by using msecs_to_jiffies() function.
> 
> Signed-off-by: Nicolas de Pesloüan <nicolas.2p.debian@...e.fr>
> 
> --- /usr/src/linux/drivers/net/bonding/bond_main_orig.c 2008-05-13 
> 02:00:01.000000000 +0200
> +++ /usr/src/linux/drivers/net/bonding/bond_main.c      2008-05-14 
> 14:55:53.000000000 +0200
> @@ -2391,7 +2391,7 @@
>                 read_lock(&bond->lock);
>         }
> 
> -       delay = ((bond->params.miimon * HZ) / 1000) ? : 1;
> +       delay = msecs_to_jiffies(bond->params.miimon);
>         read_unlock(&bond->lock);
>         queue_delayed_work(bond->wq, &bond->mii_work, delay);
>  }
> @@ -2704,7 +2704,7 @@
> 
>         read_lock(&bond->lock);
> 
> -       delta_in_ticks = (bond->params.arp_interval * HZ) / 1000;
> +       delta_in_ticks = msecs_to_jiffies(bond->params.arp_interval);
> 
>         if (bond->kill_timers) {
>                 goto out;
> @@ -2837,7 +2837,7 @@
> 
>         read_lock(&bond->lock);
> 
> -       delta_in_ticks = (bond->params.arp_interval * HZ) / 1000;
> +       delta_in_ticks = msecs_to_jiffies(bond->params.arp_interval * HZ);

This seems like it should be just:

	delta_in_ticks = msecs_to_jiffies(bond->params.arp_interval);

Assuming the interval is in milliseconds, based on the previous usage.
Since it's multiplying by HZ (ticks per second) and dividing by 1000 
(milliseconds per second), it was converting from milliseconds to ticks.

Same for the other changes?

	Joe
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ