Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1345196imm; Tue, 2 Oct 2018 06:52:10 -0700 (PDT) X-Google-Smtp-Source: ACcGV61kzoeR5uhNuBH7vzqrKTvm0x94/JuxbLDAaBUc2N8JFukWE/QGCwc525U+Xl06+ahJDs0w X-Received: by 2002:a63:6ce:: with SMTP id 197-v6mr14334707pgg.338.1538488330396; Tue, 02 Oct 2018 06:52:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538488330; cv=none; d=google.com; s=arc-20160816; b=T0NEcDJ5uBcDsL7o4lvv5VT7LE0KfI+2HSk5h6gm7/NVNqBeBZv1GIe176Osa3jBzW lqvHcLZq8rNTNpvlVLGpvqwzOEWNnBeRje6Gk3wVlDYX1az+sBXGAcZvPZBLkqOAjT6e U044kjsjn8lfl3Tbt6XIarIiiLxrif+479kyvnSyuRT4jDcHgUgmsDaTxNdnY3ykVhGU W+sMUwsqtk7m4IXVzZhoz2RHSvvi0QSWYFWC4lB5x+P6dIViBxeybGZUHSr9knTE0j23 pghNeXKysQjIjIUklRdl4Slj7hZPo55898E2qVcEY6CEHEGeDJ7tFw2RCphW6WPQupOm UBWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from; bh=sN8C4cc4h9Ri5hzt8GcZfyWGp3Iieqem+5NMXOvcwX0=; b=efRA1eFU2Y9Ls8FgHqdJYM87d0z8f7urbvsPuqttnXt//MRQe8+BmxrHI2u8ldWkwG c2jSXVxUEV3KVp7nHusswUIWxf9envHhbulP/ojSXejo0QuzHzcd5yv+S8KVfQUqwkRK uDoNd0T5l8rq5tOzWqc3ikFe0quIAEmU4Ni2iAv6WXkoDLyZrdxCDyiDQ7GyBJHeDTz+ 1+y+Wegw0a25PB0P+T9x+gINYPLPuEBHckf48zQcv2F5Ig3QZQ0XZlqDeZlcL4l9+x7e jSXuHJVaaTIHeSOs0H1BP8sTLl4wsUc6+XWvgtmviRlLVCyNUCoUGcVkI0JvZtRVda63 7y0w== 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 n5-v6si15611958plp.186.2018.10.02.06.51.55; Tue, 02 Oct 2018 06:52:10 -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 S1731904AbeJBURC (ORCPT + 99 others); Tue, 2 Oct 2018 16:17:02 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:34976 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731866AbeJBURA (ORCPT ); Tue, 2 Oct 2018 16:17:00 -0400 Received: from localhost (24-104-73-23-ip-static.hfc.comcastbusiness.net [24.104.73.23]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id F1E54B2F; Tue, 2 Oct 2018 13:33:36 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jeff Layton , "J. Bruce Fields" , Sasha Levin Subject: [PATCH 4.14 077/137] nfsd: fix corrupted reply to badly ordered compound Date: Tue, 2 Oct 2018 06:24:38 -0700 Message-Id: <20181002132503.944309704@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181002132458.446916963@linuxfoundation.org> References: <20181002132458.446916963@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: "J. Bruce Fields" [ Upstream commit 5b7b15aee641904ae269be9846610a3950cbd64c ] We're encoding a single op in the reply but leaving the number of ops zero, so the reply makes no sense. Somewhat academic as this isn't a case any real client will hit, though in theory perhaps that could change in a future protocol extension. Reviewed-by: Jeff Layton Signed-off-by: J. Bruce Fields Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- fs/nfsd/nfs4proc.c | 1 + 1 file changed, 1 insertion(+) --- a/fs/nfsd/nfs4proc.c +++ b/fs/nfsd/nfs4proc.c @@ -1725,6 +1725,7 @@ nfsd4_proc_compound(struct svc_rqst *rqs if (status) { op = &args->ops[0]; op->status = status; + resp->opcnt = 1; goto encode_op; }