On Mon, Jul 25, 2022 at 12:35 PM Marek Vasut <marex@xxxxxxx> wrote: > The driver currently performs register read-modify-write without locking > in its irqchip part, this could lead to a race condition when configuring > interrupt mode setting. Add the missing bgpio spinlock lock/unlock around > the register read-modify-write. > > Fixes: 07bd1a6cc7cbb ("MXC arch: Add gpio support for the whole platform") > Signed-off-by: Marek Vasut <marex@xxxxxxx> > Cc: Bartosz Golaszewski <bgolaszewski@xxxxxxxxxxxx> > Cc: Linus Walleij <linus.walleij@xxxxxxxxxx> > Cc: Loic Poulain <loic.poulain@xxxxxxxxxx> > Cc: Marc Zyngier <maz@xxxxxxxxxx> > Cc: NXP Linux Team <linux-imx@xxxxxxx> > Cc: Peng Fan <peng.fan@xxxxxxx> > Cc: Shawn Guo <shawnguo@xxxxxxxxxx> > --- > V3: New patch > V4: Include linux/spinlock.h > V5: Use raw_spinlock per 3c938cc5cebcb ("gpio: use raw spinlock for gpio chip shadowed data") OK I was a bit confused this looks good and that spinlock is indeed raw. There is maybe a bit of over-locking with one single lock for all registers but I'm not very picky so: Reviewed-by: Linus Walleij <linus.walleij@xxxxxxxxxx> Yours, Linus Walleij