Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp4444938pxb; Mon, 21 Feb 2022 21:50:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJxMaKF8ABY6DKBzJ5bFhszkcguu+CQKHrPevc5OGrzLyqRVgAclBxNSqMPPc8o1ngl24c3M X-Received: by 2002:a62:770a:0:b0:4e0:2547:9219 with SMTP id s10-20020a62770a000000b004e025479219mr23215150pfc.43.1645509042431; Mon, 21 Feb 2022 21:50:42 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1645509042; cv=pass; d=google.com; s=arc-20160816; b=WEr4gmRdU/Wgn1fQI2hnoCMF+UBgEAUAGoiSUGEICb4pvlgtc5JKcG6gCs8HDzily/ wkIbI5SpKgBWK9RGCW6xVB1RecFD4+TVUjRrOSwGfHgfYpq13dd0iankyq+ynY0a/Gjm rvVozBD4iSqNXYYchjRl7EDysWjZ8ihGXYSY3y+x7jz0WYQxUELjz3puLdfGQkYtO8zV n+W0kufO/9U+3GjYW4HQ8jCPpO3MHE/NRhNbewuQ3REEwhrmkTgEb28lAZ3Hblo36LpN rdtY2oZCfLbLjTCfGRq+FvwqSG8+53YjCx5B+Hv4tHPHB8jeEHMySXO37g3FQdoQ9UPx v+ww== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=WKgVCY1x560wjpb2d6+V1DLhy9frcWvJFP7CwbCVLYo=; b=hrRzgvZTyICSKoyH0pwPrmfffWB+pREbRh8iYZgLjHO2j3pm6LGCDTxog7F5fFvu9f BWmC1/0pY8mhElNKrdx1+S9uWpXA7kWq4MMWbvxjv3r6pHcT3jWUow1ZaVMMMpAI3EoZ xN/yMVo0pM8Xny241HJInIuJXTyQ0e9E249+S2C/dnguSLOjiyPvaXS7/wexmh+QsG8d gENoLxmQlzgJl2/EsuDdnUyJotBFIYPv1hy9ymoOKdKvT4vwlhG+8FJ946sRDk9ItRvx 8eOGKuaZ/IT3klGjSxZIPJgM7mFukdb3gdIRx6jbuJfgYVXqObajnyXNp1IrcMcSAAzQ 4XZw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@anirudhrb.com header.s=zoho header.b=jGUZ9sbh; arc=pass (i=1 spf=pass spfdomain=anirudhrb.com dkim=pass dkdomain=anirudhrb.com dmarc=pass fromdomain=anirudhrb.com>); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id f1si37275703plg.184.2022.02.21.21.50.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Feb 2022 21:50:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@anirudhrb.com header.s=zoho header.b=jGUZ9sbh; arc=pass (i=1 spf=pass spfdomain=anirudhrb.com dkim=pass dkdomain=anirudhrb.com dmarc=pass fromdomain=anirudhrb.com>); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B9899E0AFF; Mon, 21 Feb 2022 21:14:17 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1380037AbiBUQQh (ORCPT + 99 others); Mon, 21 Feb 2022 11:16:37 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:40250 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379981AbiBUQPx (ORCPT ); Mon, 21 Feb 2022 11:15:53 -0500 Received: from sender4-of-o53.zoho.com (sender4-of-o53.zoho.com [136.143.188.53]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3115F23BD4; Mon, 21 Feb 2022 08:15:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645460114; cv=none; d=zohomail.com; s=zohoarc; b=DuraJutovSGUPCk2XURRrMVrKu6VjFrkpxn3ohqo5fprZYZythN4kZr5L9vB+4OWuIwfdwPp+RpUOJquHBSulT8FY/qwXVq43kqpJaKCM9aJM2wf7dl29hIRxg7vzkYPpGh2RMi+ark3/46aurhztCscwZ1lXvxWARegXKg5BD0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1645460114; h=Content-Type:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=WKgVCY1x560wjpb2d6+V1DLhy9frcWvJFP7CwbCVLYo=; b=nicyYhark7OR16sCX1xhUBcwDGIYt4LknSzouz0gc7yc5uN5RKAAm8i9TKH/DRcPHjW8wTWm7vmGVvlD9PBKLQiAhutmoNm2zD4KL4rynz9FX3JxcFggEgUyRTIkgWPodjkn3d3po5z4HU+hnL/RWx6iATs5fF4HkVVIhIygPvE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=anirudhrb.com; spf=pass smtp.mailfrom=mail@anirudhrb.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1645460114; s=zoho; d=anirudhrb.com; i=mail@anirudhrb.com; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:Content-Type:In-Reply-To; bh=WKgVCY1x560wjpb2d6+V1DLhy9frcWvJFP7CwbCVLYo=; b=jGUZ9sbhScheWcPDrud7NDlwDJxZu5m76omQlDu2Vg5+271FB2w8f/PRG7UQpB2f 2EjASNOE+EbFI/B0ooZl7DSteqIpUvjkw0RXrCMT3fHe+bdJDeSJIv/Cp0CMN4t4RX6 QgxShMv7rSPGHGKHtXew11+2odP6x1wKSZ0tz0FA= Received: from anirudhrb.com (49.207.206.107 [49.207.206.107]) by mx.zohomail.com with SMTPS id 1645460088394764.7856299620081; Mon, 21 Feb 2022 08:14:48 -0800 (PST) Date: Mon, 21 Feb 2022 21:44:39 +0530 From: Anirudh Rayabharam To: Stefano Garzarella Cc: "Michael S. Tsirkin" , kernel list , Mike Christie , Jason Wang , netdev , Linux Virtualization , Stefan Hajnoczi , kvm , Hillf Danton Subject: Re: [PATCH] vhost/vsock: don't check owner in vhost_vsock_stop() while releasing Message-ID: References: <20220221114916.107045-1-sgarzare@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-ZohoMailClient: External X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 21, 2022 at 02:59:30PM +0100, Stefano Garzarella wrote: > On Mon, Feb 21, 2022 at 12:49 PM Stefano Garzarella 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@vger.kernel.org > > Reported-by: syzbot+1e3ea63db39f2b4440e0@syzkaller.appspotmail.com > > Signed-off-by: Stefano Garzarella > > --- > > drivers/vhost/vsock.c | 14 ++++++++------ > > 1 file changed, 8 insertions(+), 6 deletions(-) > > Reported-and-tested-by: syzbot+0abd373e2e50d704db87@syzkaller.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. Thanks, - Anirudh. > Reported-and-tested-by: syzbot+3140b17cb44a7b174008@syzkaller.appspotmail.com >