]> git.baikalelectronics.ru Git - kernel.git/commit
netem: dont call vfree() under spinlock and BH disabled
authorEric Dumazet <eric.dumazet@gmail.com>
Fri, 23 Dec 2011 19:28:51 +0000 (19:28 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 24 Dec 2011 21:08:50 +0000 (16:08 -0500)
commite388e4c96554083a98d1af03ccc1c9836a99433b
treed31943c70571f28ff241234a2bffa765a1d4ef92
parentb9c3854b89b5803ce4d52fd0c066735e6b6ea8d9
netem: dont call vfree() under spinlock and BH disabled

commit 42a481f3a8 (netem: use vmalloc for distribution table) added a
regression, since vfree() is called while holding a spinlock and BH
being disabled.

Fix this by doing the pointers swap in critical section, and freeing
after spinlock release.

Also add __GFP_NOWARN to the kmalloc() try, since we fallback to
vmalloc().

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/sch_netem.c