Commit f3b9605d authored by David S. Miller's avatar David S. Miller

Revert "pkt_sched: Add BH protection for qdisc_stab_lock."

This reverts commit 1cfa2666.

qdisc_destroy() runs fully under RTNL again and not from softint any
longer, so this change is no longer needed.
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent deb3abf1
...@@ -332,7 +332,7 @@ static struct qdisc_size_table *qdisc_get_stab(struct nlattr *opt) ...@@ -332,7 +332,7 @@ static struct qdisc_size_table *qdisc_get_stab(struct nlattr *opt)
if (!s || tsize != s->tsize || (!tab && tsize > 0)) if (!s || tsize != s->tsize || (!tab && tsize > 0))
return ERR_PTR(-EINVAL); return ERR_PTR(-EINVAL);
spin_lock_bh(&qdisc_stab_lock); spin_lock(&qdisc_stab_lock);
list_for_each_entry(stab, &qdisc_stab_list, list) { list_for_each_entry(stab, &qdisc_stab_list, list) {
if (memcmp(&stab->szopts, s, sizeof(*s))) if (memcmp(&stab->szopts, s, sizeof(*s)))
...@@ -340,11 +340,11 @@ static struct qdisc_size_table *qdisc_get_stab(struct nlattr *opt) ...@@ -340,11 +340,11 @@ static struct qdisc_size_table *qdisc_get_stab(struct nlattr *opt)
if (tsize > 0 && memcmp(stab->data, tab, tsize * sizeof(u16))) if (tsize > 0 && memcmp(stab->data, tab, tsize * sizeof(u16)))
continue; continue;
stab->refcnt++; stab->refcnt++;
spin_unlock_bh(&qdisc_stab_lock); spin_unlock(&qdisc_stab_lock);
return stab; return stab;
} }
spin_unlock_bh(&qdisc_stab_lock); spin_unlock(&qdisc_stab_lock);
stab = kmalloc(sizeof(*stab) + tsize * sizeof(u16), GFP_KERNEL); stab = kmalloc(sizeof(*stab) + tsize * sizeof(u16), GFP_KERNEL);
if (!stab) if (!stab)
...@@ -355,9 +355,9 @@ static struct qdisc_size_table *qdisc_get_stab(struct nlattr *opt) ...@@ -355,9 +355,9 @@ static struct qdisc_size_table *qdisc_get_stab(struct nlattr *opt)
if (tsize > 0) if (tsize > 0)
memcpy(stab->data, tab, tsize * sizeof(u16)); memcpy(stab->data, tab, tsize * sizeof(u16));
spin_lock_bh(&qdisc_stab_lock); spin_lock(&qdisc_stab_lock);
list_add_tail(&stab->list, &qdisc_stab_list); list_add_tail(&stab->list, &qdisc_stab_list);
spin_unlock_bh(&qdisc_stab_lock); spin_unlock(&qdisc_stab_lock);
return stab; return stab;
} }
...@@ -367,14 +367,14 @@ void qdisc_put_stab(struct qdisc_size_table *tab) ...@@ -367,14 +367,14 @@ void qdisc_put_stab(struct qdisc_size_table *tab)
if (!tab) if (!tab)
return; return;
spin_lock_bh(&qdisc_stab_lock); spin_lock(&qdisc_stab_lock);
if (--tab->refcnt == 0) { if (--tab->refcnt == 0) {
list_del(&tab->list); list_del(&tab->list);
kfree(tab); kfree(tab);
} }
spin_unlock_bh(&qdisc_stab_lock); spin_unlock(&qdisc_stab_lock);
} }
EXPORT_SYMBOL(qdisc_put_stab); EXPORT_SYMBOL(qdisc_put_stab);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment