[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220221164420.cnhs6sgxizc6tcok@sgarzare-redhat>
Date: Mon, 21 Feb 2022 17:44:20 +0100
From: Stefano Garzarella <sgarzare@...hat.com>
To: Anirudh Rayabharam <mail@...rudhrb.com>
Cc: "Michael S. Tsirkin" <mst@...hat.com>,
kernel list <linux-kernel@...r.kernel.org>,
Mike Christie <michael.christie@...cle.com>,
Jason Wang <jasowang@...hat.com>,
netdev <netdev@...r.kernel.org>,
Linux Virtualization <virtualization@...ts.linux-foundation.org>,
Stefan Hajnoczi <stefanha@...hat.com>,
kvm <kvm@...r.kernel.org>, Hillf Danton <hdanton@...a.com>
Subject: Re: [PATCH] vhost/vsock: don't check owner in vhost_vsock_stop()
while releasing
On Mon, Feb 21, 2022 at 09:44:39PM +0530, Anirudh Rayabharam wrote:
>On Mon, Feb 21, 2022 at 02:59:30PM +0100, Stefano Garzarella wrote:
>> On Mon, Feb 21, 2022 at 12:49 PM Stefano Garzarella <sgarzare@...hat.com> wrote:
>> >
>> > 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.
>> >
>> > Fixes: 433fc58e6bf2 ("VSOCK: Introduce vhost_vsock.ko")
>> > Cc: stable@...r.kernel.org
>> > Reported-by: syzbot+1e3ea63db39f2b4440e0@...kaller.appspotmail.com
>> > Signed-off-by: Stefano Garzarella <sgarzare@...hat.com>
>> > ---
>> > drivers/vhost/vsock.c | 14 ++++++++------
>> > 1 file changed, 8 insertions(+), 6 deletions(-)
>>
>> Reported-and-tested-by: syzbot+0abd373e2e50d704db87@...kaller.appspotmail.com
>
>I don't think this patch fixes "INFO: task hung in vhost_work_dev_flush"
>even though syzbot says so. I am able to reproduce the issue locally
>even with this patch applied.
Are you using the sysbot reproducer or another test?
In that case, can you share it?
From the stack trace it seemed to me that the worker accesses a zone
that has been cleaned (iotlb), so it is invalid and fails.
That's why I had this patch tested which should stop the worker before
cleaning.
Thanks,
Stefano
Powered by blists - more mailing lists