Re: [PATCH 11/13] selinux: Cleanup printk logging in netif

Paul Moore
2018-06-19T17:46:58Z

On Tue, Jun 12, 2018 at 4:09 AM Peter Enderborg
<peter.enderborg@sony.com> wrote:
>
> Replace printk with pr_* to avoid checkpatch warnings.
>
> Signed-off-by: Peter Enderborg <peter.enderborg@sony.com>
> ---
> security/selinux/netif.c | 11 ++++-------
> 1 file changed, 4 insertions(+), 7 deletions(-)

Merged, thanks.

> diff --git a/security/selinux/netif.c b/security/selinux/netif.c
> index ac65f7417413..8c738c189942 100644
> --- a/security/selinux/netif.c
> +++ b/security/selinux/netif.c
> @@ -145,9 +145,8 @@ static int sel_netif_sid_slow(struct net *ns, int ifindex, u32 *sid)
>
> dev = dev_get_by_index(ns, ifindex);
> if (unlikely(dev == NULL)) {
> - printk(KERN_WARNING
> - "SELinux: failure in sel_netif_sid_slow(),"
> - " invalid network interface (%d)\n", ifindex);
> + pr_warn("SELinux: failure in %s(), invalid network interface (%d)\n",
> + __func__, ifindex);
> return -ENOENT;
> }
>
> @@ -177,10 +176,8 @@ static int sel_netif_sid_slow(struct net *ns, int ifindex, u32 *sid)
> spin_unlock_bh(&sel_netif_lock);
> dev_put(dev);
> if (unlikely(ret)) {
> - printk(KERN_WARNING
> - "SELinux: failure in sel_netif_sid_slow(),"
> - " unable to determine network interface label (%d)\n",
> - ifindex);
> + pr_warn("SELinux: failure in %s(), unable to determine network interface label (%d)\n",
> + __func__, ifindex);
> kfree(new);
> }
> return ret;
> --
> 2.15.1
>

--
paul moore