Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3428568imu; Sun, 11 Nov 2018 14:53:50 -0800 (PST) X-Google-Smtp-Source: AJdET5dv5oEeAz4zfHBcxsyWX8tBhiueuBOePwUSj11xSLdtaQVa/3gQx7cg7OApEZPWcE28+LMs X-Received: by 2002:a62:1b4f:: with SMTP id b76-v6mr17864512pfb.96.1541976830446; Sun, 11 Nov 2018 14:53:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541976830; cv=none; d=google.com; s=arc-20160816; b=fgZjd46b7MJdci2+quJcmFzB/6R2idyHCTlJD2l+afad1wFtjMfmiSGkMmLVddB9qO dFRtOwYd4sJqvJ0W9zBJN1DhmWPLwvxXpngK2wOGUPpemUv/MZg9ajfJcE2WDoZ6VCQU xvNaAyL0vxRTGYobHAM75A4+Tyi+1HWyi9Za6wHreOp7v33JNLzWSvPBgwOFqXYQRzS+ +u/VHQ/iWiFFSykTkFlKX2rl6eC9Ypng/wkFGzoLOrZVEJdGqa8oxxpU+pwWcVHRCUcm WP93RarH7Pr5VaSgV2fSz5Dh85gs3EAKMCdjxigb6ljg1laIFBFKH8zDzcxK5prSxAI3 wftg== 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=XfF3+v+5+dwc7fodhSqS+S8rtOocD4l1NuR/MWiJ/b8=; b=BYlOkS2+vzUhhG/pbBoQTeZjzS9SXJIxsC+mlrqYyMO+35/oKJt5MbFNCb511oVscz 4wTvAU5jAWux5kI+y7WlUAo2nrVkOPTtznxC4ZABvwmqA/8HmwDiGohp87okq1/+tJ6i 2u2KRqCK8cTceLMyhv1YIL90CIKO/Z8k3396luguctj90ne3V5qtVER0X/oFUwcLOkeu 4qxeGl3bDjqXx8XjM1XreRv2vQPnLEAHcGLZyJhg8QLy7EsdeEqllrsjYv23U5VZgaLc gW5+V2TrU39BaG9FxHTeDmdPoK18QeG/lF3P9odX4IJ4HTxfvlSxTX3a3ieS//n/zAbT wSPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ih0tY5eE; 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 15-v6si16645905pfr.242.2018.11.11.14.53.35; Sun, 11 Nov 2018 14:53:50 -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=ih0tY5eE; 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 S2404122AbeKLIXE (ORCPT + 99 others); Mon, 12 Nov 2018 03:23:04 -0500 Received: from mail.kernel.org ([198.145.29.99]:54772 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404039AbeKLIXB (ORCPT ); Mon, 12 Nov 2018 03:23:01 -0500 Received: from localhost (unknown [206.108.79.134]) (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 0B98E2241E; Sun, 11 Nov 2018 22:33:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541975584; bh=N0hg1GwiB9XGPR/SF7YFRDCILUA0QSU+mHGARIou9As=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ih0tY5eE1/i0uLkfDy4CFM1mDlgv/zS153LyZtd8HQFnAHI3vWq1iV2Zx/C9q7n6n zd21MCBKw3rha8Cr/lr8u1iMHkA9E3swe74I7DurKaNpUT1g3Je/W6VrUooFpOMZA0 wClR0yDdy+j8/imwKYOUsqWyElBgUO/Mf+txAhDo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Lukas Czerner , Theodore Tso , stable@kernel.org Subject: [PATCH 4.14 137/222] ext4: initialize retries variable in ext4_da_write_inline_data_begin() Date: Sun, 11 Nov 2018 14:23:54 -0800 Message-Id: <20181111221659.802163680@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181111221647.665769131@linuxfoundation.org> References: <20181111221647.665769131@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: Lukas Czerner commit 625ef8a3acd111d5f496d190baf99d1a815bd03e upstream. Variable retries is not initialized in ext4_da_write_inline_data_begin() which can lead to nondeterministic number of retries in case we hit ENOSPC. Initialize retries to zero as we do everywhere else. Signed-off-by: Lukas Czerner Signed-off-by: Theodore Ts'o Fixes: bc0ca9df3b2a ("ext4: retry allocation when inline->extent conversion failed") Cc: stable@kernel.org Signed-off-by: Greg Kroah-Hartman --- fs/ext4/inline.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/fs/ext4/inline.c +++ b/fs/ext4/inline.c @@ -869,7 +869,7 @@ int ext4_da_write_inline_data_begin(stru handle_t *handle; struct page *page; struct ext4_iloc iloc; - int retries; + int retries = 0; ret = ext4_get_inode_loc(inode, &iloc); if (ret)