czw., 6 lut 2020 o 19:14 Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> napisał(a): > > User may ask device helper tool, for example, udev, to create a specific > symbolic link to a device node. GPIO chip character device node is not > exceptional. However, libgpiod in the commit d9b1c1f14c6b > ("core: harden gpiod_chip_open()") went way too far in the hardening device > node check. > > Relax that hardening for symbolic link to fix the regression. > > Reproducer: > > % gpioinfo /dev/gpiochip5 > gpiochip5 - 16 lines: > line 0: "MUX33_DIR" "uart1-rx-oe" output active-high [used] > ... > > % ln -sf /dev/gpiochip5 /dev/MyGPIO_5 > > % gpioinfo /dev/MyGPIO_5 > gpioinfo: looking up chip /dev/MyGPIO_5: Inappropriate ioctl for device > > Link: https://stackoverflow.com/questions/60057494/gpio-issue-with-sym-link > Fixes: d9b1c1f14c6b ("core: harden gpiod_chip_open()") > Cc: Bartosz Golaszewski <bartekgola@xxxxxxxxx> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> Patch applied and backported to v1.4.x and v1.5.x stable branches. Thanks! Bartosz