diff options
author | Stefano Garzarella <[email protected]> | 2022-02-22 10:47:42 +0100 |
---|---|---|
committer | David S. Miller <[email protected]> | 2022-02-23 12:32:33 +0000 |
commit | a58da53ffd70294ebea8ecd0eb45fd0d74add9f9 (patch) | |
tree | 674e148b37fbe2fba93917635ed65ad26470ec23 /tools/perf/scripts/python/export-to-sqlite.py | |
parent | 277f2bb14361790a70e4b3c649e794b75a91a597 (diff) |
vhost/vsock: don't check owner in vhost_vsock_stop() while releasing
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: 433fc58e6bf2 ("VSOCK: Introduce vhost_vsock.ko")
Cc: [email protected]
Reported-by: [email protected]
Reported-and-tested-by: [email protected]
Signed-off-by: Stefano Garzarella <[email protected]>
Acked-by: Jason Wang <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions