]> rtime.felk.cvut.cz Git - linux-imx.git/commit
s390/virtio-ccw: Fix setup_vq error handling.
authorCornelia Huck <cornelia.huck@de.ibm.com>
Fri, 25 Jan 2013 14:34:16 +0000 (15:34 +0100)
committerGleb Natapov <gleb@redhat.com>
Wed, 30 Jan 2013 10:35:55 +0000 (12:35 +0200)
commitc98d3683ce675d689121147ed00e7c4af4737518
treeccb2b54c7befb859908b30c1653cae2774314bea
parent15bc8d8457875f495c59d933b05770ba88d1eacb
s390/virtio-ccw: Fix setup_vq error handling.

virtio_ccw_setup_vq() failed to unwind correctly on errors. In
particular, it failed to delete the virtqueue on errors, leading to
list corruption when virtio_ccw_del_vqs() iterated over a virtqueue
that had not been added to the vcdev's list.

Fix this with redoing the error unwinding in virtio_ccw_setup_vq(),
using a single path for all errors.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Gleb Natapov <gleb@redhat.com>
drivers/s390/kvm/virtio_ccw.c