diff options
author | Chunhui Li <[email protected]> | 2024-09-11 11:28:02 +0800 |
---|---|---|
committer | Luis Chamberlain <[email protected]> | 2024-09-13 09:55:17 -0700 |
commit | ce47f7cbbcadbc716325ccdd3be5d71f1e10a966 (patch) | |
tree | 04e7e54e3263a76c1a9477ab93a44b2916a1b3d1 /lib/crypto/mpi/mpi-mul.c | |
parent | 907fa79d787f6f762c0afb67b8b02be8ed1f7bd2 (diff) |
module: abort module loading when sysfs setup suffer errors
When insmod a kernel module, if fails in add_notes_attrs or
add_sysfs_attrs such as memory allocation fail, mod_sysfs_setup
will still return success, but we can't access user interface
on android device.
Patch for make mod_sysfs_setup can check the error of
add_notes_attrs and add_sysfs_attrs
[mcgrof: the section stuff comes from linux history.git [0]]
Fixes: 3f7b0672086b ("Module section offsets in /sys/module") [0]
Fixes: 6d76013381ed ("Add /sys/module/name/notes")
Acked-by: Luis Chamberlain <[email protected]>
Reviewed-by: Petr Pavlu <[email protected]>
Reported-by: kernel test robot <[email protected]>
Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
Link: https://git.kernel.org/pub/scm/linux/kernel/git/history/history.git/commit/?id=3f7b0672086b97b2d7f322bdc289cbfa203f10ef [0]
Signed-off-by: Xion Wang <[email protected]>
Signed-off-by: Chunhui Li <[email protected]>
Signed-off-by: Luis Chamberlain <[email protected]>
Diffstat (limited to 'lib/crypto/mpi/mpi-mul.c')
0 files changed, 0 insertions, 0 deletions