mirror of
https://github.com/torvalds/linux
synced 2024-10-06 11:25:23 +00:00
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>
This commit is contained in:
parent
fc983171e4
commit
851541709a
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue