Re: [PATCH v7] usb:serial:pl2303: add GPIOs interface on PL2303

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> > 
> > Known issue:
> > If gpios are in use(export to userspace through sysfs interface, etc),
> > then call pl2303_release(unplug usb-serial convertor, modprobe -r, 
etc),
> > will cause trouble, so we need to make sure there is no gpio user 
before
> > call pl2303_release.
> 
> This is a real problem that we need to address. gpiolib isn't really
> able to handle devices that just disappear. In fact, it's API claims 
that
> we must not call gpiochip_remove with requested gpios and this is
> exactly what you might do in pl2303hx_gpio_release below.
> 
> As I mentioned earlier, this crashes the kernel when a new gpiochip is
> later added (the gpiochip data structures are likely corrupted and we
> get a NULL pointer deref in gpiochip_find_base).
> 
> Linus, any thoughts on this?

Hi,
there are several USB to I2C bus adapters and I2C IO-Expanders,
how is this handled there ?

Maybe we you can take some idea from there.

best regards,
Hannes


--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux