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 925CA1DA60C; Tue, 8 Oct 2024 12:31:12 +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=1728390672; cv=none; b=qLu0L3vMTQFn6TnQD1PMa1acR9GIX5P4K4I8s0cBXYgnNOCeOca4FptjHbwMRRTlgtTP+eXhShf3yfu31+2Aj/Fz0v7LhR3S3F3VshsVw14Fn0/kTSFQVvgbij5n5ZVxE1y/bomrDaNYRTpj6uqYHVUXy/yHsdJsL/7dG3E19GI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728390672; c=relaxed/simple; bh=Xh5DXJYxuCM8fJJqeYghHjQuHfAxQMTNGTCQlWRexBo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=B0KnVEJYYh4OotfTLy+8QvfoqMh5Kqm64UaBsV+m8KmBlK9ojSuKOigpFxN7PokkRLVdTFXm7HUlUe9hSDmoU8Wjt0tMMl+qUxOqzaUNjxEbc5XxVqNqT5963B02XiJFNIcw+iCdPjjqtmShOebHfx2pMH2Pp6ptvY4kBFkR9mM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=obLWCMxI; 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="obLWCMxI" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DAE07C4CEC7; Tue, 8 Oct 2024 12:31:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1728390672; bh=Xh5DXJYxuCM8fJJqeYghHjQuHfAxQMTNGTCQlWRexBo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=obLWCMxInZ8hQHMCKx/x+LKxWrkF5XKMfLlpx2xAMQmCWeBM0pXzaTTxQ4T7YkDx1 +6TXdJCnqmtndti1CS7YsYZxTwTJx+3R+UgFxcRCyzumR3DYCgAqdcw0yjV6L2unxo Y8YNFW+5wPat+qnFs6uKRfzBFOTF6/XxRl2tgkvk= 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 6.10 356/482] ocfs2: remove unreasonable unlock in ocfs2_read_blocks Date: Tue, 8 Oct 2024 14:06:59 +0200 Message-ID: <20241008115702.431148969@linuxfoundation.org> X-Mailer: git-send-email 2.46.2 In-Reply-To: <20241008115648.280954295@linuxfoundation.org> References: <20241008115648.280954295@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 6.10-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! */