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-next>] [day] [month] [year] [list]
Message-ID: <20200812080049.GH2674@hirez.programming.kicks-ass.net>
Date:   Wed, 12 Aug 2020 10:00:49 +0200
From:   peterz@...radead.org
To:     Maciej Żenczykowski <maze@...gle.com>
Cc:     Eric Dumazet <edumazet@...gle.com>,
        "David S . Miller" <davem@...emloft.net>,
        netdev <netdev@...r.kernel.org>,
        Eric Dumazet <eric.dumazet@...il.com>,
        Alex Belits <abelits@...vell.com>,
        Nitesh Narayan Lal <nitesh@...hat.com>
Subject: Re: [PATCH net] net: accept an empty mask in
 /sys/class/net/*/queues/rx-*/rps_cpus

On Tue, Aug 11, 2020 at 06:45:23PM -0700, Maciej Żenczykowski wrote:
> On Tue, Aug 11, 2020 at 6:34 PM Eric Dumazet <edumazet@...gle.com> wrote:
> 
> > We must accept an empty mask in store_rps_map(), or we are not able
> > to disable RPS on a queue.
> >
> > Fixes: 07bbecb34106 ("net: Restrict receive packets queuing to
> > housekeeping CPUs")
> > Signed-off-by: Eric Dumazet <edumazet@...gle.com>
> > Reported-by: Maciej Żenczykowski <maze@...gle.com>
> > Cc: Alex Belits <abelits@...vell.com>
> > Cc: Nitesh Narayan Lal <nitesh@...hat.com>
> > Cc: Peter Zijlstra (Intel) <peterz@...radead.org>
> > ---
> >  net/core/net-sysfs.c | 12 +++++++-----
> >  1 file changed, 7 insertions(+), 5 deletions(-)
> >
> > diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c
> > index
> > 9de33b594ff2693c054022a42703c90084122444..efec66fa78b70b2fe5b0a5920317eb1d0415d9e3
> > 100644
> > --- a/net/core/net-sysfs.c
> > +++ b/net/core/net-sysfs.c
> > @@ -757,11 +757,13 @@ static ssize_t store_rps_map(struct netdev_rx_queue
> > *queue,
> >                 return err;
> >         }
> >
> > -       hk_flags = HK_FLAG_DOMAIN | HK_FLAG_WQ;
> > -       cpumask_and(mask, mask, housekeeping_cpumask(hk_flags));
> > -       if (cpumask_empty(mask)) {
> > -               free_cpumask_var(mask);
> > -               return -EINVAL;
> > +       if (!cpumask_empty(mask)) {
> > +               hk_flags = HK_FLAG_DOMAIN | HK_FLAG_WQ;
> > +               cpumask_and(mask, mask, housekeeping_cpumask(hk_flags));
> > +               if (cpumask_empty(mask)) {
> > +                       free_cpumask_var(mask);
> > +                       return -EINVAL;
> > +               }
> >         }

Ah indeed! Sorry about that.

Acked-by: Peter Zijlstra (Intel) <peterz@...radead.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ