summaryrefslogtreecommitdiff
path: root/rust/kernel/workqueue.rs
diff options
context:
space:
mode:
authorAndré Almeida <andrealmeid@igalia.com>2024-09-02 19:55:03 -0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-12-05 14:02:01 +0100
commit89933f8ab3b4cad5ac14ea56a39947d1ffe7d0e3 (patch)
tree2c8411a88d8f60b6f27661ed8e1b3171537f2e7c /rust/kernel/workqueue.rs
parentf84c5ef6ca23cc2f72f3b830d74f67944684bb05 (diff)
downloadlinux-89933f8ab3b4cad5ac14ea56a39947d1ffe7d0e3.tar.gz
linux-89933f8ab3b4cad5ac14ea56a39947d1ffe7d0e3.tar.bz2
linux-89933f8ab3b4cad5ac14ea56a39947d1ffe7d0e3.zip
unicode: Fix utf8_load() error path
[ Upstream commit 156bb2c569cd869583c593d27a5bd69e7b2a4264 ] utf8_load() requests the symbol "utf8_data_table" and then checks if the requested UTF-8 version is supported. If it's unsupported, it tries to put the data table using symbol_put(). If an unsupported version is requested, symbol_put() fails like this: kernel BUG at kernel/module/main.c:786! RIP: 0010:__symbol_put+0x93/0xb0 Call Trace: <TASK> ? __die_body.cold+0x19/0x27 ? die+0x2e/0x50 ? do_trap+0xca/0x110 ? do_error_trap+0x65/0x80 ? __symbol_put+0x93/0xb0 ? exc_invalid_op+0x51/0x70 ? __symbol_put+0x93/0xb0 ? asm_exc_invalid_op+0x1a/0x20 ? __pfx_cmp_name+0x10/0x10 ? __symbol_put+0x93/0xb0 ? __symbol_put+0x62/0xb0 utf8_load+0xf8/0x150 That happens because symbol_put() expects the unique string that identify the symbol, instead of a pointer to the loaded symbol. Fix that by using such string. Fixes: 2b3d04787012 ("unicode: Add utf8-data module") Signed-off-by: André Almeida <andrealmeid@igalia.com> Reviewed-by: Theodore Ts'o <tytso@mit.edu> Link: https://lore.kernel.org/r/20240902225511.757831-2-andrealmeid@igalia.com Signed-off-by: Gabriel Krisman Bertazi <krisman@suse.de> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'rust/kernel/workqueue.rs')
0 files changed, 0 insertions, 0 deletions