]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
fs/nls: Fix inconsistency between utf8_to_utf32() and utf32_to_utf8()
authorArmin Wolf <W_Armin@gmx.de>
Sat, 29 Nov 2025 11:15:35 +0000 (12:15 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Dec 2025 13:03:35 +0000 (14:03 +0100)
commitc3430e94a0a235928253d9d06fde7d2dd7300d64
tree629dc9a06b5fd656079ffd2043b1c1d493ed6d69
parent6d335d8a26bf79092d2fd3486546ec8a466470fd
fs/nls: Fix inconsistency between utf8_to_utf32() and utf32_to_utf8()

[ Upstream commit c36f9d7b2869a003a2f7d6ff2c6bac9e62fd7d68 ]

After commit 25524b619029 ("fs/nls: Fix utf16 to utf8 conversion"),
the return values of utf8_to_utf32() and utf32_to_utf8() are
inconsistent when encountering an error: utf8_to_utf32() returns -1,
while utf32_to_utf8() returns errno codes. Fix this inconsistency
by modifying utf8_to_utf32() to return errno codes as well.

Fixes: 25524b619029 ("fs/nls: Fix utf16 to utf8 conversion")
Suggested-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Link: https://patch.msgid.link/20251129111535.8984-1-W_Armin@gmx.de
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nls/nls_base.c