aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2011-12-11 23:42:53 +0000
committerGreg Kroah-Hartman <gregkh@suse.de>2012-01-06 14:14:08 -0800
commit01d6bbab3834409c220083f25810be9f1a553054 (patch)
treefa5ef27bb1f28919a67538bc5bb59dc55ff21f29 /net/sched
parent9ec14c04ec6be93ff397adf250bc91ee77742bfb (diff)
downloadkernel_samsung_smdk4412-01d6bbab3834409c220083f25810be9f1a553054.zip
kernel_samsung_smdk4412-01d6bbab3834409c220083f25810be9f1a553054.tar.gz
kernel_samsung_smdk4412-01d6bbab3834409c220083f25810be9f1a553054.tar.bz2
sch_gred: should not use GFP_KERNEL while holding a spinlock
[ Upstream commit 3f1e6d3fd37bd4f25e5b19f1c7ca21850426c33f ] gred_change_vq() is called under sch_tree_lock(sch). This means a spinlock is held, and we are not allowed to sleep in this context. We might pre-allocate memory using GFP_KERNEL before taking spinlock, but this is not suitable for stable material. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'net/sched')
-rw-r--r--net/sched/sch_gred.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sched/sch_gred.c b/net/sched/sch_gred.c
index b9493a0..6cd8ddf 100644
--- a/net/sched/sch_gred.c
+++ b/net/sched/sch_gred.c
@@ -385,7 +385,7 @@ static inline int gred_change_vq(struct Qdisc *sch, int dp,
struct gred_sched_data *q;
if (table->tab[dp] == NULL) {
- table->tab[dp] = kzalloc(sizeof(*q), GFP_KERNEL);
+ table->tab[dp] = kzalloc(sizeof(*q), GFP_ATOMIC);
if (table->tab[dp] == NULL)
return -ENOMEM;
}