Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2091764imm; Thu, 2 Aug 2018 06:10:35 -0700 (PDT) X-Google-Smtp-Source: AAOMgpenQMWC8A9MVMFX/8MbG2mhVD7gL+rz2X4IhjPD1hr30XrPgUTuGaVxg7ay7fWkXpRheQ9A X-Received: by 2002:a63:121a:: with SMTP id h26-v6mr2824562pgl.316.1533215435171; Thu, 02 Aug 2018 06:10:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533215435; cv=none; d=google.com; s=arc-20160816; b=OY7q81CkAGtX5cD0TuiV2qQ2njM3zzafWmhvydLhIZ8hoW8ridfkkwgO8gsmdeOQ9n TGg8gnDikqxZ/amzzYABjTPVQ/DlltopKaxc5cLH9BspEg7Bxx7YA0hvoCVBXoP+fUs4 0AeYAx+Jn/oeZyYn2lYcnW7j3Ie357vGBeVjKcX842GN86IH4rA5mYE/nUn8Ws2fGHlE ZcOqLHUfH4tXug8aupfgGQsvlvxH7U6DeoZzjLxcNgYLGQm5B9KXhmO9+Xde3lEJxsDb QwIVZMfiiLolKoHina6lZAS2NHOhx+WAURP3xg4XhLXZvX+2ycyl2SdRIA7GMUNHBO8o qdGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:arc-authentication-results; bh=++e4mZgrTfbeULcfEF9DmzC4BEnND5NjdgEJW5c68W4=; b=e470rNKQb75NNLkPHw3H+AJyPIsOiG7qEpJySbu+S7uhhT5PYbquU4T3aKidPOOZPj fKYaZIz9o7eV3PMHLDcWzz1x6ve1cIoK9ZWOyftXcvLtEV4dPD+hw5w2Cud2Z57wO/2d dwzRde1KC7OwLnp0kblOhcZZWRUWcDGD1I+hcVYKFiwCS9Vm0LVYN7rk3JMBiOQQqGk6 979OeaeQfjHqbnVcjzUkTdRM8awqT5c86UZJ21DzAILc7Mj/MQMkYqoaaWdpeVaSZANO eWQi0MzqVGKFzwP1juOAfMtoiGX7Nybr1hr3+/RbsuJZHuGA//tR3nEiS2eE5k+WVU3j KU/g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h3-v6si1768402pgc.122.2018.08.02.06.10.20; Thu, 02 Aug 2018 06:10:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387538AbeHBPAl (ORCPT + 99 others); Thu, 2 Aug 2018 11:00:41 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:10614 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2387411AbeHBPAk (ORCPT ); Thu, 2 Aug 2018 11:00:40 -0400 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 85AFF22D19B6A; Thu, 2 Aug 2018 21:09:26 +0800 (CST) Received: from linux-work.huawei.com (10.67.189.174) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.399.0; Thu, 2 Aug 2018 21:09:21 +0800 From: nixiaoming To: , , , , CC: , Subject: [PATCH v3] fs/nfsd: Delete invalid assignment statements in nfsd4_decode_exchange_id Date: Thu, 2 Aug 2018 20:32:45 +0800 Message-ID: <20180802123245.4276-1-nixiaoming@huawei.com> X-Mailer: git-send-email 2.10.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.67.189.174] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org READ_BUF(8); dummy = be32_to_cpup(p++); dummy = be32_to_cpup(p++); ... READ_BUF(4); dummy = be32_to_cpup(p++); Assigning value to "dummy" here, but that stored value is overwritten before it can be used. At the same time READ_BUF() will re-update the pointer p. delete invalid assignment statements Signed-off-by: nixiaoming Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust Signed-off-by: J. Bruce Fields --- fs/nfsd/nfs4xdr.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c index a96843c..e669e20 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c @@ -1390,10 +1390,8 @@ nfsd4_decode_exchange_id(struct nfsd4_compoundargs *argp, p += XDR_QUADLEN(dummy); } - /* ssp_window and ssp_num_gss_handles */ + /* ignore ssp_window and ssp_num_gss_handles */ READ_BUF(8); - dummy = be32_to_cpup(p++); - dummy = be32_to_cpup(p++); break; default: goto xdr_error; -- 2.10.1