All of lore.kernel.org
 help / color / mirror / Atom feed
* [net PATCH] net: sched: lock imbalance in hhf qdisc
@ 2014-05-01 15:15 John Fastabend
  2014-05-01 15:30 ` Eric Dumazet
  0 siblings, 1 reply; 3+ messages in thread
From: John Fastabend @ 2014-05-01 15:15 UTC (permalink / raw)
  To: edumazet, vtlam; +Cc: netdev

hhf_change() takes the sch_tree_lock and releases it but misses the error
cases. Fix the missed case here.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
---
 net/sched/sch_hhf.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/net/sched/sch_hhf.c b/net/sched/sch_hhf.c
index edee03d..1803f89 100644
--- a/net/sched/sch_hhf.c
+++ b/net/sched/sch_hhf.c
@@ -565,8 +565,10 @@ static int hhf_change(struct Qdisc *sch, struct nlattr *opt)
 		new_hhf_non_hh_weight = nla_get_u32(tb[TCA_HHF_NON_HH_WEIGHT]);
 
 	non_hh_quantum = (u64)new_quantum * new_hhf_non_hh_weight;
-	if (non_hh_quantum > INT_MAX)
+	if (non_hh_quantum > INT_MAX) {
+		sch_tree_unlock(sch);
 		return -EINVAL;
+	}
 	q->quantum = new_quantum;
 	q->hhf_non_hh_weight = new_hhf_non_hh_weight;
 

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

end of thread, other threads:[~2014-05-01 16:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-01 15:15 [net PATCH] net: sched: lock imbalance in hhf qdisc John Fastabend
2014-05-01 15:30 ` Eric Dumazet
2014-05-01 16:15   ` John Fastabend

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.