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 84C36C61DA4 for ; Mon, 6 Mar 2023 17:12:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230135AbjCFRMC (ORCPT ); Mon, 6 Mar 2023 12:12:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58210 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230004AbjCFRMB (ORCPT ); Mon, 6 Mar 2023 12:12:01 -0500 Received: from mail-qv1-xf2f.google.com (mail-qv1-xf2f.google.com [IPv6:2607:f8b0:4864:20::f2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F59865132; Mon, 6 Mar 2023 09:11:22 -0800 (PST) Received: by mail-qv1-xf2f.google.com with SMTP id m4so7111892qvq.3; Mon, 06 Mar 2023 09:11:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678122590; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=A+BGgoHDzc7+NmR0hn4rA1NNLqZTh2qEE69Q1RGzpP8=; b=hvReIGjzJBupBHJOehU1TDMWO1dOnGTbZNPIde2a2Jq6vgsGhwuzfwOTFgma2u5t/k xicXjF3V9Ja3+447N9Ok9RxKSBagblklCgQx51Jlw2sAkdSkYWZ+q4QVg2LZWjodgpqx mUiDhLSp7D24RCg/gdVYgmT0tPZlTZbWNNRvJzWjqYIthGI/gmwVBVGf8bd2e3zjXtyI /L3ZzEc/yrl9mUwi0Xx2EDboZUceIMihinbagAy3VFNSwZFyIuMJKaRyQGuN1CGWFwRQ F9mKaypW+bwfZpxv3c1lptFjVG9Vq8nTlmRS66a08SpOjVzHsdr15NXqoDTLNI+b8ljE lF9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678122590; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=A+BGgoHDzc7+NmR0hn4rA1NNLqZTh2qEE69Q1RGzpP8=; b=0gdqiC4G7h4fYNTRW5B10BWg9NWoEaqAopvm0QYxg8b9V4DLWmD3CCrFVgZHznoS8j ipZ9p9U3u002hh015zQnogjTXFMVi9fMulqomkvDPdP8DLj/oRZWbumNp49At0SMQvb+ RWue5sY5OmOfx+qrpwO24uO8ytIujgtl7AQwUN2l7WsO2Ax0Clci2m5SZM3nN2yvSukn CY+hVML3GuF+fcMTpr9MdaHrzTMmxIpI9AfUAR6BGfagiNFWqzaX4kD9xF0AXF/XQVZf Ngbe5Uvr83YQHJpI1S+oQzs8L/4hnxRwrkPeEB5hQpTrOPkd1e0xVrXK3XgZr5AQ7Aw6 6qoQ== X-Gm-Message-State: AO0yUKX0h73WJflyX3QAQmE/j0g+Iu2DK+CrA6NSqEJbU3/ACVtkHWDY 0PRFsnHPR/INvlloA92O7YcdAqhGuKWePCKZPqw= X-Google-Smtp-Source: AK7set/dNXrM/q4DD+eq7JiFfAV/j8ceoLnDGBHikXrbmdNTN3Xbus+CPPP87DWUcfC1mb7fZBut6SeRE/I+aqLXQ4E= X-Received: by 2002:a05:6214:913:b0:56e:ff38:46a2 with SMTP id dj19-20020a056214091300b0056eff3846a2mr3125460qvb.10.1678122590367; Mon, 06 Mar 2023 09:09:50 -0800 (PST) MIME-Version: 1.0 References: <82526863-d07a-0a5d-2990-1555b1387f26@linaro.org> <2C5E9725-F152-4D2E-882E-CF92A35481BF@hammerspace.com> <7ba38377-7992-7f0f-d905-cceb42510f39@linaro.org> <51430925-8046-7066-84ed-2ff0db835347@linaro.org> <2add1769-1458-b185-bc78-6d573f61b6fc@linaro.org> <32530c36-91d0-d351-0689-aed6a0975a4b@linaro.org> <2f285607-cbf9-6abc-f436-edb6e9a3938b@linaro.org> <4fe39d77-eb7c-a578-aefa-45b76e2247c2@linaro.org> In-Reply-To: From: Anna Schumaker Date: Mon, 6 Mar 2023 12:09:34 -0500 Message-ID: Subject: Re: Regression: NULL pointer dereference after NFS_V4_2_READ_PLUS (commit 7fd461c47) To: Krzysztof Kozlowski Cc: Trond Myklebust , Anna Schumaker , linux-nfs , Linux Kernel Mailing List , "regressions@lists.linux.dev" Content-Type: multipart/mixed; boundary="000000000000e3cadb05f63e5cc4" Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org --000000000000e3cadb05f63e5cc4 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Krzysztof, On Tue, Feb 14, 2023 at 6:02=E2=80=AFAM Krzysztof Kozlowski wrote: > > On 12/02/2023 15:05, Anna Schumaker wrote: > >>> From ac2d6c501dbcdb306480edaee625b5496f1fb4f5 Mon Sep 17 00:00:00 200= 1 > >>> From: Anna Schumaker > >>> Date: Fri, 10 Feb 2023 15:50:22 -0500 > >>> Subject: [PATCH] NFSv4.2: Rework scratch handling for READ_PLUS > >>> > >> > >> Patch is corrupted - maybe mail program reformatted it when sending: > >> > >> Applying: NFSv4.2: Rework scratch handling for READ_PLUS > >> error: corrupt patch at line 12 > >> Patch failed at 0001 NFSv4.2: Rework scratch handling for READ_PLUS > > > > That's weird. I wasn't expecting gmail to reformat the patch but I > > guess it did. I've added it as an attachment so that shouldn't happen > > again. > > Still null ptr (built on 420b2d4 with your patch): We're through the merge window and at rc1 now, so I can spend more time scratching my head over your bug again. We've come up with a patch (attached) that adds a bunch of printks to show us what the kernel thinks is going on. Do you mind trying it out and letting us know what gets printed out? You'll need to make sure CONFIG_NFS_V4_2_READ_PLUS is enabled when compiling the kernel. Thanks, Anna > > [ 144.690844] mmiocpy from xdr_inline_decode (net/sunrpc/xdr.c:1419 net/= sunrpc/xdr.c:1454) > [ 144.695950] xdr_inline_decode from nfs4_xdr_dec_read_plus (fs/nfs/nfs4= 2xdr.c:1063 fs/nfs/nfs42xdr.c:1147 fs/nfs/nfs42xdr.c:1360 fs/nfs/nfs42xdr.c= :1341) > [ 144.702452] nfs4_xdr_dec_read_plus from call_decode (net/sunrpc/clnt.c= :2595) > [ 144.708429] call_decode from __rpc_execute (include/asm-generic/bitops= /generic-non-atomic.h:128 net/sunrpc/sched.c:954) > [ 144.713538] __rpc_execute from rpc_async_schedule (include/linux/sched= /mm.h:336 net/sunrpc/sched.c:1035) > [ 144.719170] rpc_async_schedule from process_one_work (include/linux/ju= mp_label.h:260 include/linux/jump_label.h:270 include/trace/events/workqueu= e.h:108 kernel/workqueue.c:2294) > [ 144.725238] process_one_work from worker_thread (include/linux/list.h:= 292 kernel/workqueue.c:2437) > [ 144.730782] worker_thread from kthread (kernel/kthread.c:378) > [ 144.735547] kthread from ret_from_fork (arch/arm/kernel/entry-common.S= :149) > > > > Best regards, > Krzysztof > --000000000000e3cadb05f63e5cc4 Content-Type: text/x-patch; charset="US-ASCII"; name="aglo-read_plus.patch" Content-Disposition: attachment; filename="aglo-read_plus.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_lex2ufs20 ZGlmZiAtLWdpdCBhL2ZzL25mcy9uZnM0Mnhkci5jIGIvZnMvbmZzL25mczQyeGRyLmMKaW5kZXgg ZDgwZWU4OGNhOTk2Li5kZWU1ZWNmMDc4NWEgMTAwNjQ0Ci0tLSBhL2ZzL25mcy9uZnM0Mnhkci5j CisrKyBiL2ZzL25mcy9uZnM0Mnhkci5jCkBAIC0zNDYsNiArMzQ2LDcgQEAgc3RhdGljIHZvaWQg ZW5jb2RlX3JlYWRfcGx1cyhzdHJ1Y3QgeGRyX3N0cmVhbSAqeGRyLAogCQkJICAgICBjb25zdCBz dHJ1Y3QgbmZzX3BnaW9fYXJncyAqYXJncywKIAkJCSAgICAgc3RydWN0IGNvbXBvdW5kX2hkciAq aGRyKQogeworCXByaW50aygi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