Skip to content

Commit

Permalink
netfilter: nfnetlink: fix missing rcu_read_unlock in nfnetlink_rcv_msg
Browse files Browse the repository at this point in the history
Bug added in commit 6b75e3e (netfilter: nfnetlink: add RCU in
nfnetlink_rcv_msg())

Signed-off-by: Tomasz Bursztyka <[email protected]>
Acked-by: Eric Dumazet <[email protected]>
Signed-off-by: Pablo Neira Ayuso <[email protected]>
  • Loading branch information
Tomasz Bursztyka authored and ummakynes committed Jun 29, 2012
1 parent d31f4d4 commit 4009e18
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion net/netfilter/nfnetlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,10 @@ static int nfnetlink_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)

err = nla_parse(cda, ss->cb[cb_id].attr_count,
attr, attrlen, ss->cb[cb_id].policy);
if (err < 0)
if (err < 0) {
rcu_read_unlock();
return err;
}

if (nc->call_rcu) {
err = nc->call_rcu(net->nfnl, skb, nlh,
Expand Down

0 comments on commit 4009e18

Please sign in to comment.