···896896 int head, ret;897897 u8 target;898898899899+ mutex_lock(&vq->mutex);899900 /*900901 * We can handle the vq only after the endpoint is setup by calling the901902 * VHOST_SCSI_SET_ENDPOINT ioctl.902902- *903903- * TODO: Check that we are running from vhost_worker which acts904904- * as read-side critical section for vhost kind of RCU.905905- * See the comments in struct vhost_virtqueue in drivers/vhost/vhost.h906903 */907907- vs_tpg = rcu_dereference_check(vq->private_data, 1);904904+ vs_tpg = vq->private_data;908905 if (!vs_tpg)909909- return;906906+ goto out;910907911911- mutex_lock(&vq->mutex);912908 vhost_disable_notify(&vs->dev, vq);913909914910 for (;;) {···10541058 vhost_scsi_free_cmd(cmd);10551059err_cmd:10561060 vhost_scsi_send_bad_target(vs, vq, head, out);10611061+out:10571062 mutex_unlock(&vq->mutex);10581063}10591064