Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp400542pxb; Tue, 29 Mar 2022 05:46:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwOy8SK3dEgLgxS3N2CNh9YzIuClwDuOCgAiKJSxpduW5Xvl2m7UWMMaEXcGC65XbKJW7rO X-Received: by 2002:a05:622a:413:b0:2e1:eb5a:c640 with SMTP id n19-20020a05622a041300b002e1eb5ac640mr26587056qtx.594.1648557999067; Tue, 29 Mar 2022 05:46:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648557999; cv=none; d=google.com; s=arc-20160816; b=m3zMxygGHLMDC9MS1d2+vV0nkU4U6D78K/YlWn3/JXnawoMa24XeGnhsHh1I2G+cRD 6TfNfEOP+RvxudUCZ71pRvh8E7aJM2382i2M28SO0s6O87FX0UH823XyhvkUnD5ZMgp9 O45bWxQ/BD5Z1zOROCfAzhHE+ySO96xpPlJSRSnUPzpvTXMAC2zYCYKacxrPmmQLWKiC ENpMi29WMMmVbj5zmW0qfYVxtMXMeP8vdAVfN7iBs0llTBIlUVxqY2X1j+p/qZ9CWrtA z+Y8MtFYp8504avx3cteFyk/hn1Wk3X8JWsW9Be2uSF0p3Pbi9+6vT0UT3PbT3LFdmlN whzQ== 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 :message-id:date:subject:cc:to:from; bh=7r3P4av9bw916eNm9lyxmFNP3B1cxEavU5me6UJ6ZA4=; b=PE7u+sMyJRdJOwhuYXyuHPjDgQqb9+fFg1bhf3CY5PxALPc+MtEazB31wqViahTnug mK9E19BPC0HiNmTKDSZI4x7nrK0nb47ZwxQenHY0fKzndow7xlHQ8xkGNK7W2vgprO1N 4FgsovS1HuM+CwBYtcR4PczoHlwVH7wgrHWvlWlNRenGQ+uKW8E1ybbWepbs9fQACT+0 WbSz2rpTRwPOnzuDh1EZarMUPdQMKK2RjKnnm4zsY+Ah8lylIUPC+/Jq1VIQrRcAwjvb GTuEF/q1jskGQq/VqgOewKU1DsDIjCV+YTqJgFxNRFwrLprEnsKx0Vh/topSZVXsMHy6 egAA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d18-20020a05620a241200b0067e4be23a60si11522075qkn.677.2022.03.29.05.45.46; Tue, 29 Mar 2022 05:46:39 -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; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235638AbiC2LTT (ORCPT + 99 others); Tue, 29 Mar 2022 07:19:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48618 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235131AbiC2LTR (ORCPT ); Tue, 29 Mar 2022 07:19:17 -0400 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9BC004D273; Tue, 29 Mar 2022 04:17:33 -0700 (PDT) Received: from kwepemi500013.china.huawei.com (unknown [172.30.72.55]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4KSRkw359WzBrgQ; Tue, 29 Mar 2022 19:13:28 +0800 (CST) Received: from kwepemm600015.china.huawei.com (7.193.23.52) by kwepemi500013.china.huawei.com (7.221.188.120) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Tue, 29 Mar 2022 19:17:30 +0800 Received: from huawei.com (10.175.127.227) by kwepemm600015.china.huawei.com (7.193.23.52) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Tue, 29 Mar 2022 19:17:29 +0800 From: ChenXiaoSong To: , , CC: , , , , , , Subject: [PATCH -next 0/2] fix nfsv4 bugs of opening with O_ACCMODE flag Date: Tue, 29 Mar 2022 19:32:06 +0800 Message-ID: <20220329113208.2466000-1-chenxiaosong2@huawei.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.127.227] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To kwepemm600015.china.huawei.com (7.193.23.52) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS, 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 This series fixes following bugs: When lseek() a file secondly opened with O_ACCMODE|O_DIRECT flags, nfs4_valid_open_stateid() will dereference NULL nfs4_state. open() with O_ACCMODE|O_DIRECT flags secondly will fail. ChenXiaoSong (2): Revert "NFSv4: Handle the special Linux file open access mode" NFSv4: fix open failure with O_ACCMODE flag fs/nfs/dir.c | 10 ---------- fs/nfs/inode.c | 1 - fs/nfs/internal.h | 10 ++++++++++ fs/nfs/nfs4file.c | 6 ++++-- 4 files changed, 14 insertions(+), 13 deletions(-) -- 2.31.1