lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAFXsbZoszFgR7vXfNHQcTnK=c2Y1+=hLuQHHh36fAfsGxozPmQ@mail.gmail.com>
Date:   Sun, 16 Aug 2020 14:21:30 -0700
From:   Chris Healy <cphealy@...il.com>
To:     Andrew Lunn <andrew@...n.ch>
Cc:     David Miller <davem@...emloft.net>,
        netdev <netdev@...r.kernel.org>, jiri@...lanox.com
Subject: Re: [PATCH] net: devlink: Remove overzealous WARN_ON with snapshots

With this patch applied, I no longer experience the kernel warning messages.

Tested-by: Chris Healy <cphealy@...il.com>

On Sun, Aug 16, 2020 at 12:27 PM Andrew Lunn <andrew@...n.ch> wrote:
>
> It is possible to trigger this WARN_ON from user space by triggering a
> devlink snapshot with an ID which already exists. We don't need both
> -EEXISTS being reported and spamming the kernel log.
>
> Signed-off-by: Andrew Lunn <andrew@...n.ch>
> ---
>  net/core/devlink.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/core/devlink.c b/net/core/devlink.c
> index e674f0f46dc2..e5feb87beca7 100644
> --- a/net/core/devlink.c
> +++ b/net/core/devlink.c
> @@ -4063,7 +4063,7 @@ static int __devlink_snapshot_id_insert(struct devlink *devlink, u32 id)
>  {
>         lockdep_assert_held(&devlink->lock);
>
> -       if (WARN_ON(xa_load(&devlink->snapshot_ids, id)))
> +       if (xa_load(&devlink->snapshot_ids, id))
>                 return -EEXIST;
>
>         return xa_err(xa_store(&devlink->snapshot_ids, id, xa_mk_value(0),
> --
> 2.28.0
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ