Re: WARNING in gpio_to_desc

From: Johan Hovold
Date: Wed Jul 17 2019 - 05:16:27 EST


On Tue, Jul 16, 2019 at 11:52:19PM +0200, Linus Walleij wrote:
> On Wed, Jul 10, 2019 at 1:07 PM syzbot
> <syzbot+cf35b76f35e068a1107f@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
>
> > HEAD commit: 7829a896 usb-fuzzer: main usb gadget fuzzer driver
> (...)
> > __gpio_set_value include/asm-generic/gpio.h:104 [inline]
> > gpio_set_value include/linux/gpio.h:71 [inline]
> > nfcmrvl_chip_halt+0x4e/0x70 drivers/nfc/nfcmrvl/main.c:259
> > nfcmrvl_nci_register_dev+0x2d4/0x378 drivers/nfc/nfcmrvl/main.c:176
> > nfcmrvl_probe+0x4e9/0x5e0 drivers/nfc/nfcmrvl/usb.c:344
>
> This bug is somewhere in the drivers/nfc/nfcmrvl* code handling
> GPIOs.

Right, and it's my bug.

> It should be converted to GPIO descriptors and fixed up, see
> drivers/gpio/TODO for details on how to do this.

Conversion will have to wait, let's fix the regression first. :)

> Johan/Vincent, tell me if you want me to forward the full fuzzing
> robot crash dump.

No need, thanks. I got it the report.

Something like the below compiles and should fix it. Vacation starts
today so I'll revisit and send a proper patch in a couple of weeks.

Perhaps someone can feed it to the bot meanwhile (no time to play with
it right now).

Note that this issue has been there since 4.12, so guess no one uses
these devices...

Johan