[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 10 Oct 2007 03:01:53 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: aarapov@...hat.com
Cc: netdev@...r.kernel.org, den@...nvz.org
Subject: Re: [PATCH] division-by-zero in inet_csk_get_port
From: Anton Arapov <aarapov@...hat.com>
Date: Wed, 10 Oct 2007 11:56:23 +0200
> Yep, that's exactly I'm talking about. I'm sure that
> [...] % (high - low) [...] erroneous from the begining, because
> in such places we want to have 1 in denominator, for the cases when we
> have only one port. Because 34000 34000 in sysctl's
> ip_local_port_range means 1(one) port, not 0(zero).
>
> So it seems to me that we have to fix mentioned denominators in
> kernel/net to have 1, that will be correct logically. And do the
> MAX<MIN check in sysctl code.
> From this point of view, it's best idea to have two patches: one for
> the kernel/net denominators and another one for the sysctl.c's
> function dointvec_minmax(). Because they can live independently. And
> the patch for the kernel/net will do the work at least because we
> prevent kernel trap at all.
>
> Dave, am I right?
Sure, two patches is fine.
-
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