diff options
author | Johan Hovold <johan@kernel.org> | 2015-05-04 17:10:45 +0200 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2015-05-12 10:47:44 +0200 |
commit | 72eba6f66a0017356380eec64db8780305aee2b8 (patch) | |
tree | 960f5d1486f52fff62c687dcbbcf9d9ce650c01a /drivers/gpio/gpiolib.h | |
parent | gpio: sysfs: use per-gpio locking (diff) | |
download | linux-dev-72eba6f66a0017356380eec64db8780305aee2b8.tar.xz linux-dev-72eba6f66a0017356380eec64db8780305aee2b8.zip |
gpio: sysfs: fix race between gpiod export and unexport
Make sure to deregister the class device (and release the irq) while
holding the sysfs lock in gpio_unexport to prevent racing with
gpio_export.
Note that this requires the recently introduced per-gpio locking to
avoid a deadlock with the kernfs active protection when waiting for the
attribute operations to drain during deregistration.
Signed-off-by: Johan Hovold <johan@kernel.org>
Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpiolib.h')
0 files changed, 0 insertions, 0 deletions