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)
committerJiri Slaby <jslaby@suse.cz>
Fri, 18 Apr 2014 09:07:00 +0000 (11:07 +0200)
commit36d8aca154bb7fe15aa62546dab3f62977a1d55b
treeddb055b29214b845274d1fe27152f73c6c221370
parent1780772eaf8b59271eb612bfbb08251017cd678a
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