mirror of https://github.com/torvalds/linux.git
vhost_vsock_stop() calls vhost_dev_check_owner() to check the device
ownership. It expects current->mm to be valid.
vhost_vsock_stop() is also called by vhost_vsock_dev_release() when
the user has not done close(), so when we are in do_exit(). In this
case current->mm is invalid and we're releasing the device, so we
should clean it anyway.
Let's check the owner only when vhost_vsock_stop() is called
by an ioctl.
When invoked from release we can not fail so we don't check return
code of vhost_vsock_stop(). We need to stop vsock even if it's not
the owner.
Fixes:
|
||
|---|---|---|
| .. | ||
| Kconfig | ||
| Makefile | ||
| iotlb.c | ||
| net.c | ||
| scsi.c | ||
| test.c | ||
| test.h | ||
| vdpa.c | ||
| vhost.c | ||
| vhost.h | ||
| vringh.c | ||
| vsock.c | ||