Commit a931dd33 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'modules-for-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux

Pull module updates from Jessica Yu:

 - Fix incorrect logic in module_kallsyms_on_each_symbol()

 - Fix for a Coccinelle warning

* tag 'modules-for-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux:
  module: correctly exit module_kallsyms_on_each_symbol when fn() != 0
  kernel/module: Use BUG_ON instead of if condition followed by BUG
parents 1423e266 2c0f0f36
......@@ -1018,8 +1018,7 @@ void __symbol_put(const char *symbol)
};
preempt_disable();
if (!find_symbol(&fsa))
BUG();
BUG_ON(!find_symbol(&fsa));
module_put(fsa.owner);
preempt_enable();
}
......@@ -4425,9 +4424,10 @@ int module_kallsyms_on_each_symbol(int (*fn)(void *, const char *,
ret = fn(data, kallsyms_symbol_name(kallsyms, i),
mod, kallsyms_symbol_value(sym));
if (ret != 0)
break;
goto out;
}
}
out:
mutex_unlock(&module_mutex);
return ret;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment