linux/drivers/vhost
Nicholas Bellinger ab8edab132 vhost-scsi: Take configfs group dependency during VHOST_SCSI_SET_ENDPOINT
This patch addresses a bug where individual vhost-scsi configfs endpoint
groups can be removed from below while active exports to QEMU userspace
still exist, resulting in an OOPs.

It adds a configfs_depend_item() in vhost_scsi_set_endpoint() to obtain
an explicit dependency on se_tpg->tpg_group in order to prevent individual
vhost-scsi WWPN endpoints from being released via normal configfs methods
while an QEMU ioctl reference still exists.

Also, add matching configfs_undepend_item() in vhost_scsi_clear_endpoint()
to release the dependency, once QEMU's reference to the individual group
at /sys/kernel/config/target/vhost/$WWPN/$TPGT is released.

(Fix up vhost_scsi_clear_endpoint() error path - DanC)

Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Stefan Hajnoczi <stefanha@redhat.com>
Cc: <stable@vger.kernel.org> # 3.6+
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
2014-10-28 13:54:16 -07:00
..
Kconfig vhost: Make vhost a separate module 2013-07-07 17:33:44 +03:00
Makefile vhost: Make vhost a separate module 2013-07-07 17:33:44 +03:00
net.c vhost-net: don't open-code kvfree 2014-06-23 09:22:48 +03:00
scsi.c vhost-scsi: Take configfs group dependency during VHOST_SCSI_SET_ENDPOINT 2014-10-28 13:54:16 -07:00
test.c vhost: move memory pointer to VQs 2014-06-09 16:21:07 +03:00
test.h
vhost.c vhost: move memory pointer to VQs 2014-06-09 16:21:07 +03:00
vhost.h vhost: move memory pointer to VQs 2014-06-09 16:21:07 +03:00
vringh.c Add missing module license tag to vring helpers. 2013-05-08 10:49:03 +09:30