mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 20:51:03 +02:00
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
This commit is contained in:
@@ -1018,8 +1018,7 @@ void __symbol_put(const char *symbol)
|
|||||||
};
|
};
|
||||||
|
|
||||||
preempt_disable();
|
preempt_disable();
|
||||||
if (!find_symbol(&fsa))
|
BUG_ON(!find_symbol(&fsa));
|
||||||
BUG();
|
|
||||||
module_put(fsa.owner);
|
module_put(fsa.owner);
|
||||||
preempt_enable();
|
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),
|
ret = fn(data, kallsyms_symbol_name(kallsyms, i),
|
||||||
mod, kallsyms_symbol_value(sym));
|
mod, kallsyms_symbol_value(sym));
|
||||||
if (ret != 0)
|
if (ret != 0)
|
||||||
break;
|
goto out;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
out:
|
||||||
mutex_unlock(&module_mutex);
|
mutex_unlock(&module_mutex);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user