From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B456F1E7664; Tue, 15 Oct 2024 11:36:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728992186; cv=none; b=d3SxcZRmvmSqI8Da1WPUz/FzHZAG3mGmLOcy5twAQWpPwu0s1cD5HOEB9NbxksoTKpRK66VgOl15aB7f3rGOHUERBZlDLSOodNXJVIqiRPvsAnVYM3izUDHQHUzjsI5zO0p7ia39+O8/I20R3obyVoH7VBXkHR4YgBpUAzuTcT0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728992186; c=relaxed/simple; bh=zZq1xZTymdYcuh5zO1vu49YsT76P11iaJVFoO6c5c/M=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=kxp3o3HfcN0Zv38ru/U8vQynFG3SCdkYG3ej1bcEqlLp6pei2x7rOlWtoMJ/vRpJTCHNguYernn94Ojz6VZHhWbqjeNGcpzCIwP3yVX4K+Z2Ivj0UH72gD+8dUospbDqO4oBnylkPYGy5LXELDx4MLkywE94/EjuhkzzjL7z0g8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=lthm0Wv7; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="lthm0Wv7" Received: by smtp.kernel.org (Postfix) with ESMTPSA id ACE01C4CEC6; Tue, 15 Oct 2024 11:36:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1728992186; bh=zZq1xZTymdYcuh5zO1vu49YsT76P11iaJVFoO6c5c/M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lthm0Wv76bPfvkIhHky+0aRkQdN20+MlNN3pZ7TfCX1hTQBZ0StpHGUoLOexRpuWL 8/zfbvNtWojgTCTPyW6dhy8UjzwmB7O/WU5GDuvwVtpNP8vEWJPYKOK4K/Dz/DWxqT nJfokFeSUnUP2qObCkMbQ2l59sP1WORvV8lMZ7S8= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Lizhi Xu , Joseph Qi , Heming Zhao , syzbot+ab134185af9ef88dfed5@syzkaller.appspotmail.com, Mark Fasheh , Joel Becker , Junxiao Bi , Changwei Ge , Gang He , Jun Piao , Andrew Morton Subject: [PATCH 5.15 012/691] ocfs2: remove unreasonable unlock in ocfs2_read_blocks Date: Tue, 15 Oct 2024 13:19:20 +0200 Message-ID: <20241015112440.819890474@linuxfoundation.org> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241015112440.309539031@linuxfoundation.org> References: <20241015112440.309539031@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Lizhi Xu commit c03a82b4a0c935774afa01fd6d128b444fd930a1 upstream. Patch series "Misc fixes for ocfs2_read_blocks", v5. This series contains 2 fixes for ocfs2_read_blocks(). The first patch fix the issue reported by syzbot, which detects bad unlock balance in ocfs2_read_blocks(). The second patch fixes an issue reported by Heming Zhao when reviewing above fix. This patch (of 2): There was a lock release before exiting, so remove the unreasonable unlock. Link: https://lkml.kernel.org/r/20240902023636.1843422-1-joseph.qi@linux.alibaba.com Link: https://lkml.kernel.org/r/20240902023636.1843422-2-joseph.qi@linux.alibaba.com Fixes: cf76c78595ca ("ocfs2: don't put and assigning null to bh allocated outside") Signed-off-by: Lizhi Xu Signed-off-by: Joseph Qi Reviewed-by: Heming Zhao Reviewed-by: Joseph Qi Reported-by: syzbot+ab134185af9ef88dfed5@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=ab134185af9ef88dfed5 Tested-by: syzbot+ab134185af9ef88dfed5@syzkaller.appspotmail.com Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Changwei Ge Cc: Gang He Cc: Jun Piao Cc: [4.20+] Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman --- fs/ocfs2/buffer_head_io.c | 1 - 1 file changed, 1 deletion(-) --- a/fs/ocfs2/buffer_head_io.c +++ b/fs/ocfs2/buffer_head_io.c @@ -235,7 +235,6 @@ int ocfs2_read_blocks(struct ocfs2_cachi if (bhs[i] == NULL) { bhs[i] = sb_getblk(sb, block++); if (bhs[i] == NULL) { - ocfs2_metadata_cache_io_unlock(ci); status = -ENOMEM; mlog_errno(status); /* Don't forget to put previous bh! */