* Re: [PATCH net] fib_rules: fix fib rule dumps across multiple skbs [not found] <1442983222-42750-1-git-send-email-roopa@cumulusnetworks.com> @ 2015-10-02 17:18 ` Roland Dreier 2015-10-02 17:44 ` roopa 0 siblings, 1 reply; 2+ messages in thread From: Roland Dreier @ 2015-10-02 17:18 UTC (permalink / raw) To: Roopa Prabhu; +Cc: David Miller, tgraf, netdev@vger.kernel.org, wkok, stable On Tue, Sep 22, 2015 at 9:40 PM, Roopa Prabhu <roopa@cumulusnetworks.com> wrote: > + err = fib_nl_fill_rule(skb, rule, NETLINK_CB(cb->skb).portid, > + cb->nlh->nlmsg_seq, RTM_NEWRULE, > + NLM_F_MULTI, ops); > + if (err) FWIW I believe this breaks pre-4.0 stable kernels (unfortunately it just showed up in 3.10.90). In kernels without 053c095a82cf ("netlink: make nlmsg_end() and genlmsg_end() void") then fib_nl_fill_rule() returns a positive value (skb->len) on success, so we break out of the loop here immediately. Symptom is "ip rule show" loops forever printing the first rule. After I finish testing a fix (as trivial as changing to "if (err < 0)") here, I'll send it to -stable guys. - R. ^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH net] fib_rules: fix fib rule dumps across multiple skbs 2015-10-02 17:18 ` [PATCH net] fib_rules: fix fib rule dumps across multiple skbs Roland Dreier @ 2015-10-02 17:44 ` roopa 0 siblings, 0 replies; 2+ messages in thread From: roopa @ 2015-10-02 17:44 UTC (permalink / raw) To: Roland Dreier; +Cc: David Miller, tgraf, netdev@vger.kernel.org, wkok, stable On 10/2/15, 10:18 AM, Roland Dreier wrote: > On Tue, Sep 22, 2015 at 9:40 PM, Roopa Prabhu <roopa@cumulusnetworks.com> wrote: >> + err = fib_nl_fill_rule(skb, rule, NETLINK_CB(cb->skb).portid, >> + cb->nlh->nlmsg_seq, RTM_NEWRULE, >> + NLM_F_MULTI, ops); >> + if (err) > FWIW I believe this breaks pre-4.0 stable kernels (unfortunately it > just showed up in 3.10.90). In kernels without 053c095a82cf > ("netlink: make nlmsg_end() and genlmsg_end() void") then > fib_nl_fill_rule() returns a positive value (skb->len) on success, so > we break out of the loop here immediately. Symptom is "ip rule show" > loops forever printing the first rule. > > After I finish testing a fix (as trivial as changing to "if (err < > 0)") here, I'll send it to -stable guys. > Thanks for catching this. ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-10-02 17:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1442983222-42750-1-git-send-email-roopa@cumulusnetworks.com>
2015-10-02 17:18 ` [PATCH net] fib_rules: fix fib rule dumps across multiple skbs Roland Dreier
2015-10-02 17:44 ` roopa
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).