aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorDan Carpenter <error27@gmail.com>2011-06-14 23:11:42 -0400
committerDavid S. Miller <davem@conan.davemloft.net>2011-06-16 23:51:35 -0400
commitc63d6ea3060d9e10773e869b1112e3a0efbcf820 (patch)
tree2f288627d1d0bfb666bb70c8dbb086932a82eb0d /net
parent59deab26c1974b29b7f501e0ace0673d5acadae1 (diff)
rtnetlink: unlock on error path in netlink_dump()
In c7ac8679bec939 "rtnetlink: Compute and store minimum ifinfo dump size", we moved the allocation under the lock so we need to unlock on error path. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: David S. Miller <davem@conan.davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/netlink/af_netlink.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index 0b92f75491b1..ca5276c51804 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -1676,7 +1676,7 @@ static int netlink_dump(struct sock *sk)
1676 1676
1677 skb = sock_rmalloc(sk, alloc_size, 0, GFP_KERNEL); 1677 skb = sock_rmalloc(sk, alloc_size, 0, GFP_KERNEL);
1678 if (!skb) 1678 if (!skb)
1679 goto errout; 1679 goto errout_skb;
1680 1680
1681 len = cb->dump(skb, cb); 1681 len = cb->dump(skb, cb);
1682 1682
@@ -1716,7 +1716,6 @@ static int netlink_dump(struct sock *sk)
1716errout_skb: 1716errout_skb:
1717 mutex_unlock(nlk->cb_mutex); 1717 mutex_unlock(nlk->cb_mutex);
1718 kfree_skb(skb); 1718 kfree_skb(skb);
1719errout:
1720 return err; 1719 return err;
1721} 1720}
1722 1721