Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

+3 -3
+3 -3
kernel/module.c
··· 1018 1018 }; 1019 1019 1020 1020 preempt_disable(); 1021 - if (!find_symbol(&fsa)) 1022 - BUG(); 1021 + BUG_ON(!find_symbol(&fsa)); 1023 1022 module_put(fsa.owner); 1024 1023 preempt_enable(); 1025 1024 } ··· 4424 4425 ret = fn(data, kallsyms_symbol_name(kallsyms, i), 4425 4426 mod, kallsyms_symbol_value(sym)); 4426 4427 if (ret != 0) 4427 - break; 4428 + goto out; 4428 4429 } 4429 4430 } 4431 + out: 4430 4432 mutex_unlock(&module_mutex); 4431 4433 return ret; 4432 4434 }