summaryrefslogtreecommitdiffstats
path: root/arch/parisc
diff options
context:
space:
mode:
authorStefano Garzarella <sgarzare@redhat.com>2022-02-22 10:47:42 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-03-02 11:38:09 +0100
commit914f93fee61a05b524ed8d8d795fa236d19f4400 (patch)
treec659b225f342bcef05a4353cd91b1c1580b4705a /arch/parisc
parent4eec5fe1c680a6c47a9bc0cde00960a4eb663342 (diff)
downloadlinux-stable-914f93fee61a05b524ed8d8d795fa236d19f4400.tar.gz
linux-stable-914f93fee61a05b524ed8d8d795fa236d19f4400.tar.bz2
linux-stable-914f93fee61a05b524ed8d8d795fa236d19f4400.zip
vhost/vsock: don't check owner in vhost_vsock_stop() while releasing
commit a58da53ffd70294ebea8ecd0eb45fd0d74add9f9 upstream. 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: stable@vger.kernel.org Reported-by: syzbot+1e3ea63db39f2b4440e0@syzkaller.appspotmail.com Reported-and-tested-by: syzbot+3140b17cb44a7b174008@syzkaller.appspotmail.com Signed-off-by: Stefano Garzarella <sgarzare@redhat.com> Acked-by: Jason Wang <jasowang@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/parisc')
0 files changed, 0 insertions, 0 deletions