From: GUO Zihua guozihua@huawei.com
hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I692HU CVE: NA
--------------------------------
This patch is merged to resolve KABI changes introduces by the backporting of commit 42df744c4166 ("LSM: switch to blocking policy update notifiers")
Signed-off-by: GUO Zihua guozihua@huawei.com Reviewed-by: Xiu Jianfeng xiujianfeng@huawei.com Signed-off-by: Yongqiang Liu liuyongqiang13@huawei.com --- drivers/infiniband/core/device.c | 4 ++-- drivers/infiniband/core/security.c | 4 ++-- include/linux/security.h | 8 ++++---- security/integrity/ima/ima_main.c | 2 +- security/security.c | 8 ++++---- 5 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/drivers/infiniband/core/device.c b/drivers/infiniband/core/device.c index 9edc85d44264..92ab95383d00 100644 --- a/drivers/infiniband/core/device.c +++ b/drivers/infiniband/core/device.c @@ -1226,7 +1226,7 @@ static int __init ib_core_init(void) goto err_mad; }
- ret = register_blocking_lsm_notifier(&ibdev_lsm_nb); + ret = register_lsm_notifier(&ibdev_lsm_nb); if (ret) { pr_warn("Couldn't register LSM notifier. ret %d\n", ret); goto err_sa; @@ -1262,7 +1262,7 @@ static void __exit ib_core_cleanup(void) roce_gid_mgmt_cleanup(); nldev_exit(); rdma_nl_unregister(RDMA_NL_LS); - unregister_blocking_lsm_notifier(&ibdev_lsm_nb); + unregister_lsm_notifier(&ibdev_lsm_nb); ib_sa_cleanup(); ib_mad_cleanup(); addr_cleanup(); diff --git a/drivers/infiniband/core/security.c b/drivers/infiniband/core/security.c index 981de7e3338e..b79b61bd6ee4 100644 --- a/drivers/infiniband/core/security.c +++ b/drivers/infiniband/core/security.c @@ -714,7 +714,7 @@ int ib_mad_agent_security_setup(struct ib_mad_agent *agent, goto free_security;
agent->lsm_nb.notifier_call = ib_mad_agent_security_change; - ret = register_blocking_lsm_notifier(&agent->lsm_nb); + ret = register_lsm_notifier(&agent->lsm_nb); if (ret) goto free_security;
@@ -733,7 +733,7 @@ void ib_mad_agent_security_cleanup(struct ib_mad_agent *agent) return;
if (agent->lsm_nb_reg) - unregister_blocking_lsm_notifier(&agent->lsm_nb); + unregister_lsm_notifier(&agent->lsm_nb);
security_ib_free_security(agent->security); } diff --git a/include/linux/security.h b/include/linux/security.h index 937b130fa17b..2960258279cb 100644 --- a/include/linux/security.h +++ b/include/linux/security.h @@ -189,8 +189,8 @@ struct security_mnt_opts { };
int call_blocking_lsm_notifier(enum lsm_event event, void *data); -int register_blocking_lsm_notifier(struct notifier_block *nb); -int unregister_blocking_lsm_notifier(struct notifier_block *nb); +int register_lsm_notifier(struct notifier_block *nb); +int unregister_lsm_notifier(struct notifier_block *nb);
static inline void security_init_mnt_opts(struct security_mnt_opts *opts) { @@ -411,12 +411,12 @@ static inline int call_blocking_lsm_notifier(enum lsm_event event, void *data) return 0; }
-static inline int register_blocking_lsm_notifier(struct notifier_block *nb) +static inline int register_lsm_notifier(struct notifier_block *nb) { return 0; }
-static inline int unregister_blocking_lsm_notifier(struct notifier_block *nb) +static inline int unregister_lsm_notifier(struct notifier_block *nb) { return 0; } diff --git a/security/integrity/ima/ima_main.c b/security/integrity/ima/ima_main.c index 834c8c927a1d..acdd5dcd74ae 100644 --- a/security/integrity/ima/ima_main.c +++ b/security/integrity/ima/ima_main.c @@ -563,7 +563,7 @@ static int __init init_ima(void) if (error) return error;
- error = register_blocking_lsm_notifier(&ima_lsm_policy_notifier); + error = register_lsm_notifier(&ima_lsm_policy_notifier); if (error) pr_warn("Couldn't register LSM notifier, error %d\n", error);
diff --git a/security/security.c b/security/security.c index cc190c983fcb..915f746d6fa6 100644 --- a/security/security.c +++ b/security/security.c @@ -187,19 +187,19 @@ int call_blocking_lsm_notifier(enum lsm_event event, void *data) } EXPORT_SYMBOL(call_blocking_lsm_notifier);
-int register_blocking_lsm_notifier(struct notifier_block *nb) +int register_lsm_notifier(struct notifier_block *nb) { return blocking_notifier_chain_register(&blocking_lsm_notifier_chain, nb); } -EXPORT_SYMBOL(register_blocking_lsm_notifier); +EXPORT_SYMBOL(register_lsm_notifier);
-int unregister_blocking_lsm_notifier(struct notifier_block *nb) +int unregister_lsm_notifier(struct notifier_block *nb) { return blocking_notifier_chain_unregister(&blocking_lsm_notifier_chain, nb); } -EXPORT_SYMBOL(unregister_blocking_lsm_notifier); +EXPORT_SYMBOL(unregister_lsm_notifier);
/* * Hook list operation macros.