From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 114B7C433FE for ; Tue, 8 Mar 2022 08:01:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344728AbiCHICf (ORCPT ); Tue, 8 Mar 2022 03:02:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48892 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344720AbiCHICd (ORCPT ); Tue, 8 Mar 2022 03:02:33 -0500 Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1046D3E5E4 for ; Tue, 8 Mar 2022 00:01:37 -0800 (PST) Received: by mail-wr1-x436.google.com with SMTP id r10so27108158wrp.3 for ; Tue, 08 Mar 2022 00:01:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=IucybA/BbH72cgwgMkENy2nc0cw2uppzQpsI3A+UQng=; b=n2kvax4T596zRbJNHl3pnQBK56Kh3dAHGIATboCR3y4jygN1ehcf5ApBgDCV5Vb3y2 SLWndLQ0RqQWcpJbKcyPuO4ztnaTn3WfZR+tAtBuAeiJ0Y4BNeMp+yu7V3xAAAEvQsfw vGDZbgQA8EuIXMQU+qtoE3wx/BO1VbroSviRdyIUievVZU8k63A/eymNH8QYO7RND78l 0P+hi35rqJI6VNdQR07pPSUOTsEeJ7ZspVOX8afsoJi3MTripFjC89dnGdmYHSVLZ1dl 3WbZw96mkjwI/2AQL/umBpbHA+/2eq+3Ehftz+AHUwt9F0eWyqjKCErDO6inxcJrERVt OwuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=IucybA/BbH72cgwgMkENy2nc0cw2uppzQpsI3A+UQng=; b=MqIO4QWWeKNiasasoHPz8JEfXm/09vkEDOHlKsuUEL8rOkKSKszHF1OPyU5zCjJ+9T WMKL3J4j1w4fvUx0bQx5HOiX0fl1HQ/maZ4u9PmPBuWOQfcYP391bYI75wQl+PPAEbfn 6rThRyvpMJwTW+sgmtMDC5kEJF84bZ7560Hp2fEEuJelQHmLrdNAkCWC6U2bBsy2j/FR Hy9GLjhZ7OqD7ypDkPb0sKUgYGLMkAAWp+qL7R9UdLk8BpQ5MGfZnk7ILPUj76uq+pVG TfYMuYlUNBTHJQoFrRkEj3DMR5jLAmiRFSk0lLfLtnfz3t7YLL0xUj28n2Og80qx6qjA 2YpA== X-Gm-Message-State: AOAM533s+TOJb9TsH5IjwVR+c7R9QH4AWOomIt765rR53Gh4MdcoZF5H AS9zskIThPvVcDVdPAljeNTdAw== X-Google-Smtp-Source: ABdhPJz+6S70Pvi8hGyqht0OJu08Ak+kz7cIlHduA+N2p+09HFTvirJzU5DqlyxwJQXndXnzxWy20w== X-Received: by 2002:adf:e7c5:0:b0:1f2:1a3:f1a0 with SMTP id e5-20020adfe7c5000000b001f201a3f1a0mr5098043wrn.21.1646726495571; Tue, 08 Mar 2022 00:01:35 -0800 (PST) Received: from google.com (cpc155339-bagu17-2-0-cust87.1-3.cable.virginm.net. [86.27.177.88]) by smtp.gmail.com with ESMTPSA id bg42-20020a05600c3caa00b00380deeaae72sm1978124wmb.1.2022.03.08.00.01.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Mar 2022 00:01:35 -0800 (PST) Date: Tue, 8 Mar 2022 08:01:32 +0000 From: Lee Jones To: "Michael S. Tsirkin" Cc: jasowang@redhat.com, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, netdev@vger.kernel.org, stable@vger.kernel.org, syzbot+adc3cb32385586bec859@syzkaller.appspotmail.com Subject: Re: [PATCH 1/1] vhost: Protect the virtqueue from being cleared whilst still in use Message-ID: References: <20220307191757.3177139-1-lee.jones@linaro.org> <20220307173439-mutt-send-email-mst@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220307173439-mutt-send-email-mst@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 07 Mar 2022, Michael S. Tsirkin wrote: > On Mon, Mar 07, 2022 at 07:17:57PM +0000, Lee Jones wrote: > > vhost_vsock_handle_tx_kick() already holds the mutex during its call > > to vhost_get_vq_desc(). All we have to do here is take the same lock > > during virtqueue clean-up and we mitigate the reported issues. > > Pls just basically copy the code comment here. this is just confuses. > > > Also WARN() as a precautionary measure. The purpose of this is to > > capture possible future race conditions which may pop up over time. > > > > Link: https://syzkaller.appspot.com/bug?extid=279432d30d825e63ba00 > > And this is a bug we already fixed, right? Well, this was the bug I set out to fix. I didn't know your patch was in flight at the time. > > Cc: > > Reported-by: syzbot+adc3cb32385586bec859@syzkaller.appspotmail.com > > not really applicable anymore ... I can remove these if it helps. -- Lee Jones [李琼斯] Principal Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog