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 /fs | |
parent | 6ffcb7971486ea4f1eb14f07f8efb0b6f829a23c (diff) | |
download | lwn-72eba6f66a0017356380eec64db8780305aee2b8.tar.gz lwn-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 'fs')
0 files changed, 0 insertions, 0 deletions