]> git.baikalelectronics.ru Git - kernel.git/commit
virtio: Initialize vq->data entries to NULL
authorAmit Shah <amit.shah@redhat.com>
Fri, 12 Feb 2010 05:02:14 +0000 (10:32 +0530)
committerRusty Russell <rusty@rustcorp.com.au>
Wed, 24 Feb 2010 03:52:29 +0000 (14:22 +1030)
commit5c9a5c61b402922f2fa88bdcea73ea84bedcfcf4
tree213051dfce6ddf5eb09d89ead56214372d200338
parent3acda809b1ce69ad2fe718295ee565be8e9c9a5f
virtio: Initialize vq->data entries to NULL

vq operations depend on vq->data[i] being NULL to figure out if the vq
entry is in use (since the previous patch).

We have to initialize them to NULL to ensure we don't work with junk
data and trigger false BUG_ONs.

Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: Shirley Ma <xma@us.ibm.com>
drivers/virtio/virtio_ring.c