pkt_sched: fq: do not hold qdisc lock while allocating memory
authorEric Dumazet <edumazet@google.com>
Fri, 7 Mar 2014 06:57:52 +0000 (22:57 -0800)
committerSeokYeon Hwang <syeon.hwang@samsung.com>
Wed, 7 May 2014 06:30:59 +0000 (15:30 +0900)
commit35a4eb68f3f0f3f49fc26a258a3ba4dd84aa76fa
tree17fff95b5195ce4ce8b2830da027cc13c1aa09b6
parent5a4e1375a537a01c5cab5b67078ba4ac7b033f2a
pkt_sched: fq: do not hold qdisc lock while allocating memory

[ Upstream commit 2d8d40afd187bced0a3d056366fb58d66fe845e3 ]

Resizing fq hash table allocates memory while holding qdisc spinlock,
with BH disabled.

This is definitely not good, as allocation might sleep.

We can drop the lock and get it when needed, we hold RTNL so no other
changes can happen at the same time.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Fixes: afe4fd062416 ("pkt_sched: fq: Fair Queue packet scheduler")
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
net/sched/sch_fq.c