Browse Source

Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux

Pull module fix from Rusty Russell:
 "Single fix: missing rbtree removal in the module load failure path.
  Easy to trigger with bad params.

  Thanks to Peter Zijlstra and Arthur Marsh for going around on this
  one"

* tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux:
  module: Fix load_module() error path
Linus Torvalds 10 năm trước cách đây
mục cha
commit
9d993ccb00
1 tập tin đã thay đổi với 1 bổ sung0 xóa
  1. 1 0
      kernel/module.c

+ 1 - 0
kernel/module.c

@@ -3557,6 +3557,7 @@ static int load_module(struct load_info *info, const char __user *uargs,
 	mutex_lock(&module_mutex);
 	/* Unlink carefully: kallsyms could be walking list. */
 	list_del_rcu(&mod->list);
+	mod_tree_remove(mod);
 	wake_up_all(&module_wq);
 	/* Wait for RCU-sched synchronizing before releasing mod->list. */
 	synchronize_sched();