lkml.org 
[lkml]   [2018]   [Dec]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2] ipv4: fib_rules: Fix possible infinite loop in fib_empty_table
From
From: YueHaibing <yuehaibing@huawei.com>
Date: Sat, 29 Dec 2018 14:45:23 +0800

> gcc warn this:
> net/ipv4/fib_rules.c:203 fib_empty_table() warn:
> always true condition '(id <= 4294967295) => (0-u32max <= u32max)'
>
> 'id' is u32, which always not greater than RT_TABLE_MAX
> (0xFFFFFFFF), So add a check to break while wrap around.
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
> v2: clean up exit conditions

Applied.

\
 
 \ /
  Last update: 2018-12-30 21:59    [W:0.025 / U:0.388 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site