[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20120719.104906.38765587582698093.davem@davemloft.net>
Date: Thu, 19 Jul 2012 10:49:06 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: lw@...fujitsu.com
Cc: netdev@...r.kernel.org, shemminger@...tta.com
Subject: Re: [PATCH V2] ipv6: fix incorrect route 'expires' value passed to
userspace
From: Li Wei <lw@...fujitsu.com>
Date: Thu, 19 Jul 2012 10:02:59 +0800
>
> When userspace use RTM_GETROUTE to dump route table, with an already
> expired route entry, we always got an 'expires' value(2147157)
> calculated base on INT_MAX.
>
> The reason of this problem is in the following satement:
> rt->dst.expires - jiffies < INT_MAX
> gcc promoted the type of both sides of '<' to unsigned long, thus
> a small negative value would be considered greater than INT_MAX.
>
> This patch fix this by use the same trick as time_after macro to
> avoid the 'unsigned long' type promotion and deal with jiffies
> wrapping.
>
> Also we should do some fix in rtnl_put_cacheinfo() which use
> jiffies_to_clock_t(which take an unsigned long as parameter) to
> convert jiffies to clock_t to handle the negative expires.
>
> Signed-off-by: Li Wei <lw@...fujitsu.com>
Your patch is corrupted by your email client and therefore will
not apply cleanly.
I think this isn't the first time your patch submissions have
had this problem, and if so then you should do the necessary
work to prevent problem with more certainty in the future as
such this makes a lot of extra work for other people.
--
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