summaryrefslogtreecommitdiff
path: root/net/netlink
diff options
context:
space:
mode:
authorDan Carpenter <error27@gmail.com>2011-06-15 03:11:42 +0000
committerDavid S. Miller <davem@conan.davemloft.net>2011-06-16 23:51:35 -0400
commitc63d6ea3060d9e10773e869b1112e3a0efbcf820 (patch)
tree2f288627d1d0bfb666bb70c8dbb086932a82eb0d /net/netlink
parent59deab26c1974b29b7f501e0ace0673d5acadae1 (diff)
downloadlinux-3.10-c63d6ea3060d9e10773e869b1112e3a0efbcf820.tar.gz
linux-3.10-c63d6ea3060d9e10773e869b1112e3a0efbcf820.tar.bz2
linux-3.10-c63d6ea3060d9e10773e869b1112e3a0efbcf820.zip
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/netlink')
-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 0b92f75491b..ca5276c5180 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -1676,7 +1676,7 @@ static int netlink_dump(struct sock *sk)
skb = sock_rmalloc(sk, alloc_size, 0, GFP_KERNEL);
if (!skb)
- goto errout;
+ goto errout_skb;
len = cb->dump(skb, cb);
@@ -1716,7 +1716,6 @@ static int netlink_dump(struct sock *sk)
errout_skb:
mutex_unlock(nlk->cb_mutex);
kfree_skb(skb);
-errout:
return err;
}