virtio: Avoid possible kernel panic if DEBUG is enabled.
authorTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Wed, 11 Feb 2015 04:31:13 +0000 (15:01 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Wed, 11 Feb 2015 04:33:14 +0000 (15:03 +1030)
commit5e05bf5833eb3dd97b6b6a52301d81e033714cb3
tree09d60b2da7bc9ac8d7179ee18d100a48b9a126a4
parent1862ee22ce2e28087299aebb6556a5cdc122d0ef
virtio: Avoid possible kernel panic if DEBUG is enabled.

The virtqueue_add() calls START_USE() upon entry. The virtqueue_kick() is
called if vq->num_added == (1 << 16) - 1 before calling END_USE().
The virtqueue_kick_prepare() called via virtqueue_kick() calls START_USE()
upon entry, and will call panic() if DEBUG is enabled.
Move this virtqueue_kick() call to after END_USE() call.

Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
drivers/virtio/virtio_ring.c