[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110615131142.GE23739@shale.localdomain>
Date: Wed, 15 Jun 2011 16:11:42 +0300
From: Dan Carpenter <error27@...il.com>
To: Greg Rose <gregory.v.rose@...el.com>
Cc: Eric Dumazet <eric.dumazet@...il.com>,
Patrick McHardy <kaber@...sh.net>,
Chris Wright <chrisw@...s-sol.org>,
"David S. Miller" <davem@...emloft.net>,
Jeff Kirsher <jeffrey.t.kirsher@...el.com>,
"open list:NETWORKING [GENERAL]" <netdev@...r.kernel.org>,
kernel-janitors@...r.kernel.org
Subject: [patch -next] 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@...il.com>
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index 0b92f7549..ca5276c 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;
}
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists