Commit 2c54396e40c79876a7ddfd3231c81eedf639795b

Authored by Linus Torvalds

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security

Pull SELinux fixlet from James Morris:
 "WARN_ONCE() here will unnecessarily terrify users"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security:
  selinux: convert WARN_ONCE() to printk() in selinux_nlmsg_perm()

Showing 1 changed file Side-by-side Diff

security/selinux/hooks.c
... ... @@ -4725,9 +4725,10 @@
4725 4725 err = selinux_nlmsg_lookup(sksec->sclass, nlh->nlmsg_type, &perm);
4726 4726 if (err) {
4727 4727 if (err == -EINVAL) {
4728   - WARN_ONCE(1, "selinux_nlmsg_perm: unrecognized netlink message:"
4729   - " protocol=%hu nlmsg_type=%hu sclass=%hu\n",
4730   - sk->sk_protocol, nlh->nlmsg_type, sksec->sclass);
  4728 + printk(KERN_WARNING
  4729 + "SELinux: unrecognized netlink message:"
  4730 + " protocol=%hu nlmsg_type=%hu sclass=%hu\n",
  4731 + sk->sk_protocol, nlh->nlmsg_type, sksec->sclass);
4731 4732 if (!selinux_enforcing || security_get_allow_unknown())
4732 4733 err = 0;
4733 4734 }