[PATCH v2] module: abort module loading when sysfs setup suffer errors

Luis Chamberlain mcgrof at kernel.org
Thu Sep 5 02:41:29 PDT 2024


On Wed, Sep 04, 2024 at 08:41:07PM +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.
> 
> Reported-by: kernel test robot <lkp at intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202409010016.3XIFSmRA-lkp@intel.com/
> Signed-off-by: Xion Wang <xion.wang at mediatek.com>
> Signed-off-by: Chunhui Li <chunhui.li at mediatek.com>

Please use Fixes tag and resend.
 
  Luis



More information about the Linux-mediatek mailing list