* [PATCH net-next-2.6] bridge: ensure to unlock in error path in br_multicast_query().
@ 2010-03-10 15:07 YOSHIFUJI Hideaki
2010-03-13 20:27 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: YOSHIFUJI Hideaki @ 2010-03-10 15:07 UTC (permalink / raw)
To: davem, netdev; +Cc: yoshfuji
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
---
net/bridge/br_multicast.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c
index 2559fb5..2326a34 100644
--- a/net/bridge/br_multicast.c
+++ b/net/bridge/br_multicast.c
@@ -823,6 +823,7 @@ static int br_multicast_query(struct net_bridge *br,
unsigned long max_delay;
unsigned long now = jiffies;
__be32 group;
+ int err = 0;
spin_lock(&br->multicast_lock);
if (!netif_running(br->dev) ||
@@ -841,12 +842,14 @@ static int br_multicast_query(struct net_bridge *br,
group = 0;
}
} else {
- if (!pskb_may_pull(skb, sizeof(struct igmpv3_query)))
- return -EINVAL;
+ if (!pskb_may_pull(skb, sizeof(struct igmpv3_query))) {
+ err = -EINVAL;
+ goto out;
+ }
ih3 = igmpv3_query_hdr(skb);
if (ih3->nsrcs)
- return 0;
+ goto out;
max_delay = ih3->code ? 1 :
IGMPV3_MRC(ih3->code) * (HZ / IGMP_TIMER_SCALE);
@@ -876,7 +879,7 @@ static int br_multicast_query(struct net_bridge *br,
out:
spin_unlock(&br->multicast_lock);
- return 0;
+ return err;
}
static void br_multicast_leave_group(struct net_bridge *br,
--
1.5.6.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next-2.6] bridge: ensure to unlock in error path in br_multicast_query().
2010-03-10 15:07 [PATCH net-next-2.6] bridge: ensure to unlock in error path in br_multicast_query() YOSHIFUJI Hideaki
@ 2010-03-13 20:27 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2010-03-13 20:27 UTC (permalink / raw)
To: yoshfuji; +Cc: netdev
From: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Date: Thu, 11 Mar 2010 00:07:34 +0900
> Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-03-13 20:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-10 15:07 [PATCH net-next-2.6] bridge: ensure to unlock in error path in br_multicast_query() YOSHIFUJI Hideaki
2010-03-13 20:27 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).