diff options
author | Dan Carpenter <error27@gmail.com> | 2011-06-15 05:11:42 +0200 |
---|---|---|
committer | David S. Miller <davem@conan.davemloft.net> | 2011-06-17 05:51:35 +0200 |
commit | c63d6ea3060d9e10773e869b1112e3a0efbcf820 (patch) | |
tree | 2f288627d1d0bfb666bb70c8dbb086932a82eb0d /net/netlink | |
parent | gianfar: Use pr_<level>, netdev_<level> and netif_<level> (diff) | |
download | linux-c63d6ea3060d9e10773e869b1112e3a0efbcf820.tar.xz linux-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.c | 3 |
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) 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; } |