linux/drivers/auxdisplay
Willy Tarreau 93dc1774d2 auxdisplay: charlcd: properly restore atomic counter on error path
Commit f4757af ("staging: panel: Fix single-open policy race condition")
introduced in 3.19-rc1 attempted to fix a race condition on the open, but
failed to properly do it and used to exit without restoring the semaphore.

This results in -EBUSY being returned after the first open error until
the module is reloaded or the system restarted (ie: consecutive to a
dual open resulting in -EBUSY or to a permission error).

[ Note for stable maintainers: the code moved from drivers/misc/panel.c
  to drivers/auxdisplay/{charlcd,panel}.c during 4.12. The patch easily
  applies there (modulo the renamed atomic counter) but I can provide a
  tested backport if desired. ]

Fixes: f4757af85 # 3.19-rc1
Cc: stable@vger.kernel.org
Cc: Mariusz Gorski <marius.gorski@gmail.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Miguel Ojeda Sandonis <miguel.ojeda.sandonis@gmail.com>
Signed-off-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-18 16:06:00 +02:00
..
Kconfig auxdisplay: Move arm-charlcd.c to drivers/auxdisplay folder 2017-04-08 17:48:20 +02:00
Makefile auxdisplay: Move arm-charlcd.c to drivers/auxdisplay folder 2017-04-08 17:48:20 +02:00
arm-charlcd.c auxdisplay: Move arm-charlcd.c to drivers/auxdisplay folder 2017-04-08 17:48:20 +02:00
cfag12864b.c Fix common misspellings 2011-03-31 11:26:23 -03:00
cfag12864bfb.c framebuffer: Use fb_<level> 2013-10-29 12:53:07 +02:00
charlcd.c auxdisplay: charlcd: properly restore atomic counter on error path 2017-09-18 16:06:00 +02:00
hd44780.c auxdisplay: hd44780: Fix DT properties to include units of measurement 2017-04-08 17:48:19 +02:00
ht16k33.c auxdisplay: ht16k33: use le16_to_cpup() to fetch LE16 data 2017-04-08 17:48:20 +02:00
img-ascii-lcd.c auxdisplay: img-ascii-lcd: Fix module autoload 2017-04-08 17:48:20 +02:00
ks0108.c auxdisplay: ks0108: initialize local parport variable 2015-08-14 17:27:17 -07:00
panel.c auxdisplay: charlcd: properly restore atomic counter on error path 2017-09-18 16:06:00 +02:00