From: Johan Hovold Date: Mon, 4 May 2015 15:10:45 +0000 (+0200) Subject: gpio: sysfs: fix race between gpiod export and unexport X-Git-Tag: omap-for-v4.3/legacy-v2-signed~191^2~35 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=72eba6f66a0017356380eec64db8780305aee2b8;p=pandora-kernel.git 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 Reviewed-by: Alexandre Courbot Signed-off-by: Linus Walleij --- Reading git-diff-tree failed