[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAHp75Vd_Z9MrqTzGKL+U1dCus3U09P3AeTBGx0J3LY56jHTDjQ@mail.gmail.com>
Date: Wed, 1 Jun 2022 17:26:29 +0200
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Sander Vanheule <sander@...nheule.net>
Cc: Linus Walleij <linus.walleij@...aro.org>,
Bartosz Golaszewski <brgl@...ev.pl>,
"open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
INAGAKI Hiroshi <musashino.open@...il.com>,
Robert Marko <robimarko@...il.com>
Subject: Re: [PATCH v1] gpio: realtek-otto: always honor empty CPU masks
On Mon, May 30, 2022 at 3:57 PM Sander Vanheule <sander@...nheule.net> wrote:
>
> On uniprocessor builds, for_each_cpu(cpu, mask) will assume 'mask'
> always contains exactly one CPU, and ignore the actual mask contents.
> This causes the loop to run, even when it shouldn't on an empty mask,
> and tries to access an uninitialised pointer.
It's too noisy traceback, I believe you may squeeze it out and leave
something like ~5-6 lines only.
...
> This patch is more of a work-around than a real fix, and ensures the
> driver runs properly on uniprocessor builds. My tests were done using an
> SMP-enabled build on a single-core system, which is why is missed this
> erroneous behaviour.
>
> The real fix would be a modification of include/linux/cpumask.h, which
> may take longer to finalise, but I would rather have the issue in this
> driver fixed in the 5.19 release.
Hmm... I dunno that cpumask fix should be hard or easy, but I think
you may try it simultaneously, so we will win one way or the other.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists