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 C842626B0B8; Thu, 13 Feb 2025 15:18:27 +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=1739459907; cv=none; b=ndL9/v70iYIIOVBaWPHgMsZPIlEw+VzNeG+HaYfotfxi8GmcYXZp7CaRpxkIsoo+D66I5aTGCmymgPhTHNqDdf7YujzUCR97PRk/1Zl0uMFWwG8C4T9FYm9jbs0U5cnBHnC0Kua4/Z4JRtDlEoRz6bM6qhPIQo240WcOzOjs3rI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739459907; c=relaxed/simple; bh=+JQS2rlTNaqP1TS7nJtVUFdJ1swx6BGtWd6VcS+nfAk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Kjx2vNb67jRiPlo6O1EokxR+jbO9d4IC3D7K3Y/GYBVne16Xf+R7Tv7AvkDkaQ8Pq9rHvflj83knLSrHGRI+kZ1OiBcXppGgmfJpcz1laz1aOv3Pf07mjDIKTw/s2DsvF4ldpjGOVJAP3ogERijrWQ1n2lfeoPgfhRYiEBkOS5U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=bisHq5z3; 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="bisHq5z3" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4FE73C4CED1; Thu, 13 Feb 2025 15:18:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1739459907; bh=+JQS2rlTNaqP1TS7nJtVUFdJ1swx6BGtWd6VcS+nfAk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bisHq5z3SEKrlMfJqbGv1PsE8rMDS53buXQCm6lCWzXuxV7/MedR9OUq5xRHMvQvw MSleWUgQE333zjnBcQNXFRfJnf8M/3I3CQSanMt3GFnX+C65bI1/6yPFpsMznO1X+d 71uL/qC9BRxzYjEZqjyGdHBEzFA9/0TACdt7t9hc= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Heming Zhao , Joseph Qi , Mark Fasheh , Joel Becker , Junxiao Bi , Changwei Ge , Jun Piao , Andrew Morton Subject: [PATCH 6.13 399/443] ocfs2: fix incorrect CPU endianness conversion causing mount failure Date: Thu, 13 Feb 2025 15:29:24 +0100 Message-ID: <20250213142456.005721093@linuxfoundation.org> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250213142440.609878115@linuxfoundation.org> References: <20250213142440.609878115@linuxfoundation.org> User-Agent: quilt/0.68 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.13-stable review patch. If anyone has any objections, please let me know. ------------------ From: Heming Zhao commit f921da2c34692dfec5f72b5ae347b1bea22bb369 upstream. Commit 23aab037106d ("ocfs2: fix UBSAN warning in ocfs2_verify_volume()") introduced a regression bug. The blksz_bits value is already converted to CPU endian in the previous code; therefore, the code shouldn't use le32_to_cpu() anymore. Link: https://lkml.kernel.org/r/20250121112204.12834-1-heming.zhao@suse.com Fixes: 23aab037106d ("ocfs2: fix UBSAN warning in ocfs2_verify_volume()") Signed-off-by: Heming Zhao Reviewed-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Changwei Ge Cc: Jun Piao Cc: Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman --- fs/ocfs2/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/fs/ocfs2/super.c +++ b/fs/ocfs2/super.c @@ -2340,7 +2340,7 @@ static int ocfs2_verify_volume(struct oc mlog(ML_ERROR, "found superblock with incorrect block " "size bits: found %u, should be 9, 10, 11, or 12\n", blksz_bits); - } else if ((1 << le32_to_cpu(blksz_bits)) != blksz) { + } else if ((1 << blksz_bits) != blksz) { mlog(ML_ERROR, "found superblock with incorrect block " "size: found %u, should be %u\n", 1 << blksz_bits, blksz); } else if (le16_to_cpu(di->id2.i_super.s_major_rev_level) !=