Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp31300rwe; Wed, 31 Aug 2022 15:48:22 -0700 (PDT) X-Google-Smtp-Source: AA6agR4ffP/2ZMWaRA6GHwf5ELGwCP465zn95Eppk8wza8m5V7+cEsfyDWJnY+GLSK9zaIF0SniL X-Received: by 2002:a17:902:e552:b0:16d:2a83:e751 with SMTP id n18-20020a170902e55200b0016d2a83e751mr26760911plf.39.1661986102540; Wed, 31 Aug 2022 15:48:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661986102; cv=none; d=google.com; s=arc-20160816; b=OslhNi68ZJER18FLfpd67bJ3hMbMSxcAq6EBXFuWqBEvCLMte8QrqeyN+HQ1xx3NCj X7Omm8PvzbByQ6BL7RPfeYAS62rkw1qHVe5AM+Slxjy5zheSPao9hB1EfcNDMqsnH0d/ n/eVKE0awf7NUSPD+56xQTsIx6eMC3vRze3LDyM6D3KUzYp9GRGrGKnnvsJRyIdduLez +RbLO4Y1JPBoQcLqs2+8jfs/uQufxA+aDqfOt517KFyOX3uKbk0MGNZ3/99qX3gwhXO0 Zk6eBn1PpFe+wNvAQtr6EGkqibZrORq1itJSVxh9qS8dZKMo9Z90MXNjkiOLJARPR4cp lbEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=b8BIA9V4gV/R6v0QwJqqLfE32V68GttrRgOEBCLtJSA=; b=axRCjeSPKTYfqvHE0qIo1YqFiFOfj8sMX0V8sRdY53BncJwOKVBDnBDQwJPmEZ3ATd t6DRfg2hi2Q26tQrkQKHkAkUZ1L80oJcMjI5fGbfDTaL9U67uwOibUNwgA7ys7aoVU0l W0WL1KfGY1zE7t7XV3TPp0F8468Gb7bLKP3oMeQ91Vz4DYob/171DCnqZqRYf5uRJj7d /YQc0/D288Ap1M493tfQStVbXKiHEbNhmMyPdUicdT0efp3QJzxI+OKmUZQSNKnJ+h9p eIxx/wRwIVR+oKtq+TdHu2feLxW8i2K3nMQLRuVK2IdxmHljHyqXZM9Jm6Vt9FBN7LuQ aqmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=e+nQts7+; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q145-20020a632a97000000b0042b609d5cc2si5948165pgq.609.2022.08.31.15.47.47; Wed, 31 Aug 2022 15:48:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=e+nQts7+; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232566AbiHaWoN (ORCPT + 99 others); Wed, 31 Aug 2022 18:44:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53524 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232526AbiHaWoM (ORCPT ); Wed, 31 Aug 2022 18:44:12 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5CCE79DB66 for ; Wed, 31 Aug 2022 15:44:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1661985850; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=b8BIA9V4gV/R6v0QwJqqLfE32V68GttrRgOEBCLtJSA=; b=e+nQts7+20+GVgjvK2N9l1oZZzWD4ByB/PgKB6ZU8YINRi2MT80ziyn8TUZ79g2O/J+pCz HtOAIXnQhxkGnMsLkppFff8MniuH+99mND99M9u3n+5cer/5H/gH3ZpoZNoq35xOyuMqU6 BP49MIBKcpYQ/nmB7F8zKa4uKx3lB0g= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-645-wicl6dt_MR-0G5YNgRoa5w-1; Wed, 31 Aug 2022 18:44:09 -0400 X-MC-Unique: wicl6dt_MR-0G5YNgRoa5w-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id BBF213C0E214; Wed, 31 Aug 2022 22:44:08 +0000 (UTC) Received: from [172.16.176.1] (unknown [10.22.48.8]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 677211121314; Wed, 31 Aug 2022 22:44:08 +0000 (UTC) From: "Benjamin Coddington" To: "Trond Myklebust" Cc: linux-nfs@vger.kernel.org Subject: Re: client call_decode WARN_ON memcmp race since 72691a269f0b Date: Wed, 31 Aug 2022 18:44:05 -0400 Message-ID: <14AB2A51-CF42-4CA8-9627-7837BD0D584A@redhat.com> In-Reply-To: <24350372a2a5cb244bc843faef569404088f9278.camel@hammerspace.com> References: <6806AB48-F7D6-4639-8D03-E31BA25C4CF3@redhat.com> <24350372a2a5cb244bc843faef569404088f9278.camel@hammerspace.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham 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-nfs@vger.kernel.org On 31 Aug 2022, at 17:34, Trond Myklebust wrote: > On Wed, 2022-08-31 at 16:20 -0400, Benjamin Coddington wrote: >> Hey Trond, >> >> Since "72691a269f0b SUNRPC: Don't reuse bvec on retransmission of the >> request" I can sometimes pop the WARN_ON() in call_decode(), usually >> on >> generic/642. >> >> I think there's a kworker halfway through >> >> xprt_complete_rqst() -> >>        xprt_request_dequeue_receive_locked() >> >> between these two linse: >>          xdr_free_bvec(&req->rq_rcv_buf); >>          req->rq_private_buf.bvec = NULL; >> >> And at the same time the task is doing the WARN_ON(memcmp()) in >> call_decode. >> >> I'm not sure of a good fix - perhaps we can fixup the other paths >> that >> require the NULL check in xdr_alloc_bvec() so we don't have to set >> bvec = >> NULL. >> >> Any thoughts? >> > > How about this? I think that will fix it. I'll test it overnight and see what happens. Ben