Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp8103451imu; Tue, 4 Dec 2018 03:04:08 -0800 (PST) X-Google-Smtp-Source: AFSGD/U4Ma0+v6mFueM6QHCDTaEbBUPNLTnP1C39n1ua4QTbxSJlEMxhJlMNnNlxBbW63RK9n0gw X-Received: by 2002:a65:6447:: with SMTP id s7mr16286347pgv.226.1543921448547; Tue, 04 Dec 2018 03:04:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543921448; cv=none; d=google.com; s=arc-20160816; b=EGPCbw0FoU+nb3K8EW7o9nPkQJ7oEE4kdwtKG909oh6DxqrAPlzX10ZhPcqsYiu4wh FTbAX4j6aoRNYBhZvKSJdI5Y0uex60u7G1SL4kMPsdl7fJn+uzs+osm2+e7vHcOcu0JW w1sHQh2zyZB8egeF7hEI4GudjBlSH3PSGo3d+y3qI+Nx9h8/Dl1ytV8EX9KzvRESOwIz Gvrp+1K6oHsrnxQ1akyDxxYtY6j8lHt4Ydp1zrMmsN4PPrv9VhVCMSTL73MRa0fhUqaN Ys1+OA39nvjTHjJ0ulqpwh/c5jJdsRR/o+QmkjmNQvfK4E+9mPApATlDZ5FV7YlwRPwv oU7w== 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:dkim-signature; bh=RDrH+iwiiJnk7xmz3AzHLfgjUn9g7j/6Bgt98vB30GE=; b=aq9WL4iTKl+Q4j7sS9WiCY7oJt4LUocY6Fp2mkH3xnE/31EBT3UlUEmhKP/V/9STsl djwZrqgGkisumj0NThtHNRdoGMASvB546epqhKp3LZ56Qp6iSwZXQinwijn7aJbfzwya nnQ7ETuWe8Buxad2S60VrtSLm9Dn0nzHisFubJqoYQLFyttp3gqjGu5KHEp1QecWJ0hi hWsPcgEReOZOBZcmMLKxFEIw+WjT6ZuD8dpM6O7xhh2A6KpUsmNWdx2AX+sOejV44oxZ XvhRx/6arCRrYNGU7TMnrsDKONhXVvFT+zD+4+hC3xl3dP/opKl25hWZ1LZggmgyx8yt Mmrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=tcLk8Stl; 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 g21si16336579plo.435.2018.12.04.03.03.52; Tue, 04 Dec 2018 03:04:08 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=default header.b=tcLk8Stl; 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 S1726634AbeLDLBE (ORCPT + 99 others); Tue, 4 Dec 2018 06:01:04 -0500 Received: from mail.kernel.org ([198.145.29.99]:46466 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727417AbeLDLBC (ORCPT ); Tue, 4 Dec 2018 06:01:02 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B599B2146D; Tue, 4 Dec 2018 11:01:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1543921262; bh=G7ZtIQyJIz/tY3XGx5QttbixJV2i9CRPDjfYB8fg/DU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tcLk8StlGCpYr+6E6viiSAy9LK9/uTeHEKoxBuA96hzDti96pMTcrihboQjP80QRu D1ohHx4ZWLI1jjKiEaLgWojYJRud1SgT4PMuGxyfSTt8hSCxlK55jhTDNs3z5tYamV lnV/Bq8BJHBkiENz0vuZpNd/cw1gACGgah1zw4Hs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, xingaopeng , Jan Kara Subject: [PATCH 4.19 117/139] ext2: initialize opts.s_mount_opt as zero before using it Date: Tue, 4 Dec 2018 11:49:58 +0100 Message-Id: <20181204103655.454888182@linuxfoundation.org> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181204103649.950154335@linuxfoundation.org> References: <20181204103649.950154335@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore 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.19-stable review patch. If anyone has any objections, please let me know. ------------------ From: xingaopeng commit e5f5b717983bccfa033282e9886811635602510e upstream. We need to initialize opts.s_mount_opt as zero before using it, else we may get some unexpected mount options. Fixes: 088519572ca8 ("ext2: Parse mount options into a dedicated structure") CC: stable@vger.kernel.org Signed-off-by: xingaopeng Signed-off-by: Jan Kara Signed-off-by: Greg Kroah-Hartman --- fs/ext2/super.c | 1 + 1 file changed, 1 insertion(+) --- a/fs/ext2/super.c +++ b/fs/ext2/super.c @@ -895,6 +895,7 @@ static int ext2_fill_super(struct super_ if (sb->s_magic != EXT2_SUPER_MAGIC) goto cantfind_ext2; + opts.s_mount_opt = 0; /* Set defaults before we parse the mount options */ def_mount_opts = le32_to_cpu(es->s_default_mount_opts); if (def_mount_opts & EXT2_DEFM_DEBUG)