Netdev List
 help / color / mirror / Atom feed
* [patch -next] rtnetlink: unlock on error path in netlink_dump()
@ 2011-06-15 13:11 Dan Carpenter
  2011-06-17  3:51 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2011-06-15 13:11 UTC (permalink / raw)
  To: Greg Rose
  Cc: Eric Dumazet, Patrick McHardy, Chris Wright, David S. Miller,
	Jeff Kirsher, open list:NETWORKING [GENERAL], kernel-janitors

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>

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;
 }
 

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [patch -next] rtnetlink: unlock on error path in netlink_dump()
  2011-06-15 13:11 [patch -next] rtnetlink: unlock on error path in netlink_dump() Dan Carpenter
@ 2011-06-17  3:51 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2011-06-17  3:51 UTC (permalink / raw)
  To: error27
  Cc: gregory.v.rose, eric.dumazet, kaber, chrisw, jeffrey.t.kirsher,
	netdev, kernel-janitors

From: Dan Carpenter <error27@gmail.com>
Date: Wed, 15 Jun 2011 16:11:42 +0300

> 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>

Applied, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-06-17  3:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-15 13:11 [patch -next] rtnetlink: unlock on error path in netlink_dump() Dan Carpenter
2011-06-17  3:51 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox