diff options
author | Christian Göttsche <cgzones@googlemail.com> | 2024-04-05 17:15:23 +0200 |
---|---|---|
committer | Paul Moore <paul@paul-moore.com> | 2024-05-01 01:01:04 +0200 |
commit | 851541709afc1a0e4fe9e8a67afd4c517223138b (patch) | |
tree | e937cdb4d9a4a938070afa25ee786d2166015577 /security | |
parent | selinux: pre-allocate the status page (diff) | |
download | linux-851541709afc1a0e4fe9e8a67afd4c517223138b.tar.xz linux-851541709afc1a0e4fe9e8a67afd4c517223138b.zip |
selinux: avoid printk_ratelimit()
The usage of printk_ratelimit() is discouraged, see
include/linux/printk.h, thus use pr_warn_ratelimited().
While editing this line address the following checkpatch warning:
WARNING: Integer promotion: Using 'h' in '%hu' is unnecessary
Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'security')
-rw-r--r-- | security/selinux/ss/services.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c index e88b1b6c4adb..f20e1968b7f7 100644 --- a/security/selinux/ss/services.c +++ b/security/selinux/ss/services.c @@ -633,8 +633,7 @@ static void context_struct_compute_av(struct policydb *policydb, } if (unlikely(!tclass || tclass > policydb->p_classes.nprim)) { - if (printk_ratelimit()) - pr_warn("SELinux: Invalid class %hu\n", tclass); + pr_warn_ratelimited("SELinux: Invalid class %u\n", tclass); return; } |