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 C68C21DF722; Tue, 8 Oct 2024 13:25:20 +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=1728393920; cv=none; b=UPFnI+iJEa+naSDpQl7qMNaeAQIlLs6ARVLVMtK06V2YQ7OzMghWE74b3L6mC9PlF4acpvYZcAg351J82sf58kaRVP1Vo4l7DBAEwdQX7w+9uz045TyCmgZ0kpaevfbgFmxAaVcuBH0y0QFlXADdI3+n9fXsjOoc1fNMIbT+c2w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728393920; c=relaxed/simple; bh=JT7Zj7vf/sAMBI/xptZdjDujO4IhQb6Bdu8ijBtjoEs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=In2RYmKj+kxavHyxam6BH9dsE6sNikaGMLR9fSq6zy3Is7cd1NB9zD4Z9xovEhQUs8ZXvbu/NuPUtYBu/o6rXiqB3XQMRBYzv6ESnvj+s7kq6RnjBu0Qk9ZpfsXH4XGpDuQFJEvKFjSfbaJlgluoEm1dBM4d5/SkyrEsvKnYjSg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=ga5mk+k8; 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="ga5mk+k8" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B86AEC4CECC; Tue, 8 Oct 2024 13:25:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1728393920; bh=JT7Zj7vf/sAMBI/xptZdjDujO4IhQb6Bdu8ijBtjoEs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ga5mk+k8jPwHVE5HF0azPyCluo9w+Fknw29urHUIAmMC2Ri+HvZdNZb3nK1S+oSa+ IFSNp51i8adR0PLSs1SI2cq9CtFTPOV2pzDh+x9z+kpKuo/yq8A91ffJg7y5L/AW1U ul5EmQanbfCEwZyp9esKC5SrwX99mxelu8egEN+4= 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.6 263/386] ocfs2: remove unreasonable unlock in ocfs2_read_blocks Date: Tue, 8 Oct 2024 14:08:28 +0200 Message-ID: <20241008115639.740079005@linuxfoundation.org> X-Mailer: git-send-email 2.46.2 In-Reply-To: <20241008115629.309157387@linuxfoundation.org> References: <20241008115629.309157387@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-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! */