]> git.baikalelectronics.ru Git - kernel.git/commit
sfq: deadlock in error path
authorstephen hemminger <shemminger@vyatta.com>
Wed, 2 Feb 2011 15:19:51 +0000 (15:19 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 3 Feb 2011 04:51:20 +0000 (20:51 -0800)
commit1922acf04cd57dcce9080c117e4df806370ce4eb
tree5a21a8c6d46efbbc604d5a1d53aa67c19076d4ab
parent559f38a13efe1a4dfa70a9f6f0adfe6fcda569ea
sfq: deadlock in error path

The change to allow divisor to be a parameter (in 2.6.38-rc1)
 commit 218094e828bf981aebe14eacf2bc96dee996521c
introduced a possible deadlock caught by sparse.

The scheduler tree lock was left locked in the case of an incorrect
divisor value. Simplest fix is to move test outside of lock
which also solves problem of partial update.

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