aboutsummaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorpix106 <sbordenave@gmail.com>2021-01-10 01:17:07 +0100
committerpix106 <sbordenave@gmail.com>2021-01-10 01:17:07 +0100
commit4e43846d0525b097d697c9fd089b8454c3a1ee4b (patch)
treeddc769275ad8b54c251dc4e797fbff9b96a50a72 /kernel
parent49d9381462eeb63aea37f03cde528deef3f09698 (diff)
parentd90a51363bc5b9c9790fae4dfafa21e9496e1c88 (diff)
Merge branch 'kernel.lnx.4.4.r38-rel' of https://github.com/android-linux-stable/msm-4.4 into 11-EASHEADr11.1
* 'kernel.lnx.4.4.r38-rel' of https://github.com/android-linux-stable/msm-4.4: Linux 4.4.250 mwifiex: Fix possible buffer overflows in mwifiex_cmd_802_11_ad_hoc_start iio:magnetometer:mag3110: Fix alignment and data leak issues. module: delay kobject uevent until after module init call powerpc: sysdev: add missing iounmap() on error in mpic_msgr_probe() quota: Don't overflow quota file offsets module: set MODULE_STATE_GOING state when a module fails to load ALSA: seq: Use bool for snd_seq_queue internal flags media: gp8psk: initialize stats at power control logic misc: vmw_vmci: fix kernel info-leak by initializing dbells in vmci_ctx_get_chkpt_doorbells() reiserfs: add check for an invalid ih_entry_count of: fix linker-section match-table corruption uapi: move constants from <linux/kernel.h> to <linux/const.h> USB: serial: digi_acceleport: fix write-wakeup deadlocks s390/dasd: fix hanging device offline processing ALSA: hda/realtek - Dell headphone has noise on unmute for ALC236 ALSA: hda - Fix a wrong FIXUP for alc289 on Dell machines ALSA: hda/realtek - Support Dell headset mode for ALC3271 ALSA: usb-audio: fix sync-ep altsetting sanity check ALSA: usb-audio: simplify set_sync_ep_implicit_fb_quirk ALSA: hda/ca0132 - Fix work handling in delayed HP detection
Diffstat (limited to 'kernel')
-rw-r--r--kernel/module.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/kernel/module.c b/kernel/module.c
index 3b7aac2ea1e5..3b3c4723fe68 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -1779,7 +1779,6 @@ static int mod_sysfs_init(struct module *mod)
if (err)
mod_kobject_put(mod);
- /* delay uevent until full sysfs population */
out:
return err;
}
@@ -1813,7 +1812,6 @@ static int mod_sysfs_setup(struct module *mod,
add_sect_attrs(mod, info);
add_notes_attrs(mod, info);
- kobject_uevent(&mod->mkobj.kobj, KOBJ_ADD);
return 0;
out_unreg_param:
@@ -3307,6 +3305,9 @@ static noinline int do_init_module(struct module *mod)
blocking_notifier_call_chain(&module_notify_list,
MODULE_STATE_LIVE, mod);
+ /* Delay uevent until module has finished its init routine */
+ kobject_uevent(&mod->mkobj.kobj, KOBJ_ADD);
+
/*
* We need to finish all async code before the module init sequence
* is done. This has potential to deadlock. For example, a newly
@@ -3595,6 +3596,7 @@ static int load_module(struct load_info *info, const char __user *uargs,
return do_init_module(mod);
bug_cleanup:
+ mod->state = MODULE_STATE_GOING;
/* module_bug_cleanup needs module_mutex protection */
mutex_lock(&module_mutex);
module_bug_cleanup(mod);