Skip to content

Commit 29fe5d5

Browse files
committed
Merge tag 'modules-6.15-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/modules/linux
Pull modules fix from Petr Pavlu: "A single fix to prevent use of an uninitialized completion pointer when releasing a module_kobject in specific situations. This addresses a latent bug exposed by commit f95bbfe ("drivers: base: handle module_kobject creation")" * tag 'modules-6.15-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/modules/linux: module: ensure that kobject_put() is safe for module type kobjects
2 parents fea4e31 + a6aeb73 commit 29fe5d5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

kernel/params.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -943,7 +943,9 @@ struct kset *module_kset;
943943
static void module_kobj_release(struct kobject *kobj)
944944
{
945945
struct module_kobject *mk = to_module_kobject(kobj);
946-
complete(mk->kobj_completion);
946+
947+
if (mk->kobj_completion)
948+
complete(mk->kobj_completion);
947949
}
948950

949951
const struct kobj_type module_ktype = {

0 commit comments

Comments
 (0)