On Wed, Apr 24, 2013 at 06:06:25PM +0800, Asias He wrote: > > > +{ > > > + > > > + struct vhost_scsi *vs = tpg->vhost_scsi; > > > + struct vhost_virtqueue *vq; > > > + u32 reason; > > > + int ret; > > > + > > > + mutex_lock(&tpg->tv_tpg_mutex); > > > + vs = tpg->vhost_scsi; > > > + mutex_unlock(&tpg->tv_tpg_mutex); > > > + if (!vs) > > > + return -ENODEV; > > > + > > > > What if clear_endpoint and close happen at this > > point? Can vhost_scsi go away so tcm_vhost_check_feature > > references freed memory? > > There is no easy way to handle this. Take a reference somewhere so this can't happen? -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html