Bug 106351 - error in upstream commit 41fc014332d91ee90c32840bf161f9685b7fbf2b fib_rules:...
Summary: error in upstream commit 41fc014332d91ee90c32840bf161f9685b7fbf2b fib_rules:...
Status: RESOLVED CODE_FIX
Alias: None
Product: Networking
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Stephen Hemminger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-20 12:20 UTC by Markus Königshaus
Modified: 2015-11-18 18:53 UTC (History)
1 user (show)

See Also:
Kernel Version: 3.14
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Markus Königshaus 2015-10-20 12:20:39 UTC
Hi,
upstream commit 41fc014332d91ee90c32840bf161f9685b7fbf2b has a small flaw. Before the patch, the loop in dump_rules (line 627 - 638, fib_rules.c) was canceled if fib_nl_fill_rule returns a value less than zero, after the patch it is canceled if fib_nl_fill_rule returns a nonzero value. But without errors fib_nl_fill_rule will return skb-> len. So I thing the termination condition should be "if (err < 0) break;" not "if (err) break;".
This error leads to OOM - Exceptions in our system with program "ip"! After changing the code to "if (err < 0) break;" everything works fine.

 
Regards, Markus
Comment 1 Markus Königshaus 2015-11-18 18:53:38 UTC
Fixed by commit 67e128d68505fa37da2b9ae6b532f11db1624a2f

Note You need to log in before you can comment on or make changes to this bug.