Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2960716imu; Mon, 19 Nov 2018 08:39:35 -0800 (PST) X-Google-Smtp-Source: AFSGD/XDRDDk/4u8qhYbzZmIFcv9KYoqqVPCbe9kRkZH2JRkg437b43E1rljt8vPU4qfw21BccEu X-Received: by 2002:a17:902:227:: with SMTP id 36mr1989705plc.140.1542645575423; Mon, 19 Nov 2018 08:39:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542645575; cv=none; d=google.com; s=arc-20160816; b=Z5gTj0lJTwK0OTfHcZj7Wsafo9o46hIQCxAPgF4Ynefmvv+2BB+lnb1NQvUwqhxhh1 MsVZejpMxMq25CLQnDzMCc5c5pQZUw0RjjNYNEV3xghb8tgY/xuS9V5ync8hi+PAYX9O ao2Ot/0bVkcNZuJGa59wilWLWFzX2ErpOfMeAjR3M7USqV6ZLFDyJtpaLBEWIcej+WHh Ia1vfrL6OHT9CiOAfVQjWZpzJzH9G4nlLygNbBTlfxBFlld8fEeRNayXhckHLfdrvl4H SvosfcMsxnpJHxTgO8tIjJU4lTIVl6s8zOQkWORezv/YrrsNnFuHcHVnfthb9nkqe1mf s9IQ== 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=auKt+l59SdR0p6pSMVxqBmQNpiad2lnqlRJcUD/Mk6s=; b=txT7jmhkGzucA/iOvELBINoJZx527A3ArjV4gLTzyXXuy89DquceW6sCUPvXpCZ65q X5Ehciz4ytw3ySi/al/vg+d3mgXHDB9G+g9Q69tGj+aRHBzpdo5n/BRoISsTv+IPdklr tgS27RAN7sJPAEnZxt9F4KaGmRFv2RsDdF3+nKrS0Kybhj1slu3p1kAuw8aV3yKHRA5H rrQUBHU/2EMjMqG2OMgUH2hJrlo4+eIQMWQIRkGp7sA7ORjVwjCVR/Bl2Cv53EZATNJx LI7GRNXg7x3TzONo9vdSDdCt0nQsFiqbioi2o1sdOtcZ5xZxL1vx8E92/KUBRvNRuik/ CIJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=SdPgedBA; 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 91-v6si34303739ply.335.2018.11.19.08.39.20; Mon, 19 Nov 2018 08:39:35 -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=SdPgedBA; 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 S1732511AbeKTDCp (ORCPT + 99 others); Mon, 19 Nov 2018 22:02:45 -0500 Received: from mail.kernel.org ([198.145.29.99]:35090 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731835AbeKTDCn (ORCPT ); Mon, 19 Nov 2018 22:02:43 -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 1E21F2147D; Mon, 19 Nov 2018 16:38:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1542645514; bh=38ZbgmQlAGrBWPttMOgxte8Rde3np1pKsVMCR6KW5NU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SdPgedBAhpu7YqzJM2UQojsk80lujaf1cDimI/EDBXDihr7+xyp0EksjKMwYrMhnC nAVzwStF2/rZG0mwUMfFH7pZgyiNvbXQh/brRBDtNlunUCfQ3EOW095xjYBRscsYqI d+o8oCmwFSdAHCYMxMcIxgVo+EW3jz4QLDCPf+a0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Vasily Averin , Theodore Tso , stable@kernel.org Subject: [PATCH 4.19 143/205] ext4: release bs.bh before re-using in ext4_xattr_block_find() Date: Mon, 19 Nov 2018 17:27:30 +0100 Message-Id: <20181119162638.024232041@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181119162616.586062722@linuxfoundation.org> References: <20181119162616.586062722@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.19-stable review patch. If anyone has any objections, please let me know. ------------------ From: Vasily Averin commit 45ae932d246f721e6584430017176cbcadfde610 upstream. bs.bh was taken in previous ext4_xattr_block_find() call, it should be released before re-using Fixes: 7e01c8e5420b ("ext3/4: fix uninitialized bs in ...") Signed-off-by: Vasily Averin Signed-off-by: Theodore Ts'o Cc: stable@kernel.org # 2.6.26 Signed-off-by: Greg Kroah-Hartman --- fs/ext4/xattr.c | 2 ++ 1 file changed, 2 insertions(+) --- a/fs/ext4/xattr.c +++ b/fs/ext4/xattr.c @@ -2405,6 +2405,8 @@ retry_inode: error = ext4_xattr_block_set(handle, inode, &i, &bs); } else if (error == -ENOSPC) { if (EXT4_I(inode)->i_file_acl && !bs.s.base) { + brelse(bs.bh); + bs.bh = NULL; error = ext4_xattr_block_find(inode, &i, &bs); if (error) goto cleanup;