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 37F6AC43219 for ; Tue, 8 Mar 2022 11:05:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346209AbiCHLGd (ORCPT ); Tue, 8 Mar 2022 06:06:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36870 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242129AbiCHLG1 (ORCPT ); Tue, 8 Mar 2022 06:06:27 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0F2D941FBA for ; Tue, 8 Mar 2022 03:05:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1646737531; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=FCTl0NyGnslmoDNlbPArwT49YkiFqe8KOOW4Ouvu6mc=; b=IuZGtZcwY/KFRNZJ3QpnIkJPkviOfS3S9HLXKPOpljk95NayY0imQdbIghDNaduY72Z1zl plMFcfrUOe3RXYbaTk9m37hV96EHFRhT+wnZMFPfKKqmbSffeP8Md5xATDdUxnJGM+ZVaT YQnTYCrnVXt6XCxixt4BeyrxaADe0f0= Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-307-DgNFtvvjMrGEJRxNkcg96w-1; Tue, 08 Mar 2022 06:05:30 -0500 X-MC-Unique: DgNFtvvjMrGEJRxNkcg96w-1 Received: by mail-ej1-f69.google.com with SMTP id m4-20020a170906160400b006be3f85906eso8509586ejd.23 for ; Tue, 08 Mar 2022 03:05:29 -0800 (PST) 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:in-reply-to; bh=FCTl0NyGnslmoDNlbPArwT49YkiFqe8KOOW4Ouvu6mc=; b=LGk8SB/alHvdvXFhiPKSTWPavFXg0eer9zs7SyvhJ2dcNQnoD1os05fgjnWyxVJBCc h7XJTyr+rDz/p6cnsgYoylFlVZvbDRkoPj3fcnHu9tH4kta+86UGH2fiw5tL+lenr0ji a/U3Rdpd/Su1P25VlCqBYrdlaEotvb+5lClq01AWBElsnZB0CRQpnXzuVeCKzMT2NFPB KzrOgCFxBeP9fx6/6az+8xsj0mmyhzW8z0Eye+B57tAUWHwVZU1rhSJU0J17hR78xfIu YxfmHO6/T8sfdojIU7Z6a+e95m6TJEUsGhQZOTdIVrwIWXwGonOCrXOl4FhNjELIoU8F P1aw== X-Gm-Message-State: AOAM5320NavZwY01+ITSlT52M14fNpDpF1n3sjjjh96GLZst9MrqWnmw QpmEuA43/1mp7hOY/KkPRExehpL4hVBWE+1OD/wo62W8xqL/RNXYke+NV6xMApqphHBGYpsIDi4 fy0OQdczbc25iNH3OZdFlheST X-Received: by 2002:a17:907:2d22:b0:6da:91fe:15a5 with SMTP id gs34-20020a1709072d2200b006da91fe15a5mr13286735ejc.448.1646737528838; Tue, 08 Mar 2022 03:05:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJwgv7cglanKYuGFfnW0Rf0VAUYwA4cx1PX1P0MLrG9UedzvWygSn4/xGLczSKDMdkoHZTSdZQ== X-Received: by 2002:a17:907:2d22:b0:6da:91fe:15a5 with SMTP id gs34-20020a1709072d2200b006da91fe15a5mr13286713ejc.448.1646737528603; Tue, 08 Mar 2022 03:05:28 -0800 (PST) Received: from redhat.com ([2.55.138.228]) by smtp.gmail.com with ESMTPSA id y12-20020a50eb8c000000b00410f02e577esm7525742edr.7.2022.03.08.03.05.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Mar 2022 03:05:28 -0800 (PST) Date: Tue, 8 Mar 2022 06:05:24 -0500 From: "Michael S. Tsirkin" To: Greg KH Cc: Lee Jones , 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: <20220308060210-mutt-send-email-mst@kernel.org> References: <20220307191757.3177139-1-lee.jones@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 08, 2022 at 09:57:57AM +0100, Greg KH wrote: > > > And what happens if the mutex is locked _RIGHT_ after you checked it? > > > You still have a race... > > > > No, we miss a warning that one time. Memory is still protected. > > Then don't warn on something that doesn't matter. This line can be > dropped as there's nothing anyone can do about it, right? I mean, the reason I wanted the warning is because there's a kernel bug, and it will break userspace. warning is just telling us this. is the bug reacheable from userspace? if we knew that we won't need the lock ... -- MST