Re: [PATCH] net: fix a potential rcu_read_lock() imbalance in rt6_fill_node()
From: John Fastabend <hidden>
Date: 2012-03-28 00:54:03
From: John Fastabend <hidden>
Date: 2012-03-28 00:54:03
On 3/27/2012 3:22 PM, David Miller wrote:
From: Eric Dumazet <redacted> Date: Tue, 27 Mar 2012 21:53:52 +0200quoted
Commit f2c31e32b378 (net: fix NULL dereferences in check_peer_redir() ) added a regression in rt6_fill_node(), leading to rcu_read_lock() imbalance. Thats because NLA_PUT() can make a jump to nla_put_failure label. Fix this by using nla_put() Many thanks to Ben Greear for his help Reported-by: Ben Greear <redacted> Reported-by: Dave Jones <redacted> Signed-off-by: Eric Dumazet <redacted>Great work everyone. I'll apply this and queue it up for stable soon. In other news, I think the days of hidden gotos from the NLA macros should be over. I'll work in net-next to redo this so that the gotos must be explicitly coded and therefore be visible when people audit these routines. Thanks! --
I can clean up the ./net/dcb/ code if it will save you some time? .John