Re: [PATCH v4 1/1] module: abort module loading when sysfs setup suffer errors

From
Luis Chamberlain <mcgrof@kernel.org>
Date
2024-09-11 18:18:25
Also in
linux-arm-kernel, linux-mediatek, lkml
Reply to
Chunhui Li, 2024-09-11
On Wed, Sep 11, 2024 at 11:28:02AM +0800, Chunhui Li wrote:
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

Fixes: db939b519bea ("Module section offsets in /sys/module")
Fixes: 6d76013381ed ("Add /sys/module/name/notes")
Acked-by: Luis Chamberlain <mcgrof@kernel.org>
Reviewed-by: Petr Pavlu <petr.pavlu@suse.com>
Reported-by: kernel test robot <redacted>
Closes: https://lore.kernel.org/oe-kbuild-all/202409010016.3XIFSmRA-lkp@intel.com/ (local)
Closes: https://lore.kernel.org/oe-kbuild-all/202409072018.qfEzZbO7-lkp@intel.com/ (local)
Signed-off-by: Xion Wang <redacted>
Signed-off-by: Chunhui Li <redacted>
Applied and pushed! I modified the commit log slighlty to fix the commit
referelcen to the first issue with sections as that is part
linux history.git.

[0] https://git.kernel.org/pub/scm/linux/kernel/git/history/history.git/commit/?id=3f7b0672086b97b2d7f322bdc289cbfa203f10ef

  Luis
Thread (3 messages) 3 messages, 2 authors, last reply 2024-09-11
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help