Commit e8d6505
misc: panel: properly restore atomic counter on error path
commit 93dc1774d2a4c7a298d5cdf78cc8acdcb7b1428d upstream.
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).
Fixes: f4757af # 3.19-rc1
Cc: Mariusz Gorski <marius.gorski@gmail.com>
Signed-off-by: Willy Tarreau <w@1wt.eu>
[wt: driver is in staging/panel in 4.4]
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent 01000c5 commit e8d6505
1 file changed
Lines changed: 19 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1431 | 1431 | | |
1432 | 1432 | | |
1433 | 1433 | | |
| 1434 | + | |
| 1435 | + | |
| 1436 | + | |
1434 | 1437 | | |
1435 | | - | |
| 1438 | + | |
1436 | 1439 | | |
| 1440 | + | |
1437 | 1441 | | |
1438 | | - | |
| 1442 | + | |
1439 | 1443 | | |
1440 | 1444 | | |
1441 | 1445 | | |
1442 | 1446 | | |
1443 | 1447 | | |
1444 | 1448 | | |
| 1449 | + | |
| 1450 | + | |
| 1451 | + | |
| 1452 | + | |
1445 | 1453 | | |
1446 | 1454 | | |
1447 | 1455 | | |
| |||
1704 | 1712 | | |
1705 | 1713 | | |
1706 | 1714 | | |
| 1715 | + | |
| 1716 | + | |
| 1717 | + | |
1707 | 1718 | | |
1708 | | - | |
| 1719 | + | |
1709 | 1720 | | |
| 1721 | + | |
1710 | 1722 | | |
1711 | | - | |
| 1723 | + | |
1712 | 1724 | | |
1713 | 1725 | | |
1714 | 1726 | | |
| 1727 | + | |
| 1728 | + | |
| 1729 | + | |
1715 | 1730 | | |
1716 | 1731 | | |
1717 | 1732 | | |
| |||
0 commit comments