Accepting request 541777 from home:michalsrb:branches:X11:XOrg
- u_os-inputthread-Force-unlock-when-stopping-thread.patch * Prevent dead lock if terminating while on inactive VT. (bnc#1062977) OBS-URL: https://build.opensuse.org/request/show/541777 OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/xorg-x11-server?expand=0&rev=680
This commit is contained in:
parent
3389e7804c
commit
ed5021cb9d
32
u_os-inputthread-Force-unlock-when-stopping-thread.patch
Normal file
32
u_os-inputthread-Force-unlock-when-stopping-thread.patch
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
Author: Michal Srb <msrb@suse.com>
|
||||||
|
Subject: os/inputthread: Force unlock when stopping thread.
|
||||||
|
Patch-Mainline: To be upstreamed
|
||||||
|
References: bnc#1062977
|
||||||
|
|
||||||
|
The inputthread is kept locked all the time while X server's VT is not active.
|
||||||
|
If the X server is terminated while not active, it will be stuck forever in
|
||||||
|
InputThreadFini waiting for the thread to join, but it wouldn't because it is
|
||||||
|
locked.
|
||||||
|
---
|
||||||
|
This fixes the X server termination while its VT is not active. I think it
|
||||||
|
should be safe to force unlock it from InputThreadFini - X server is
|
||||||
|
terminating and nothing else should race there, but I am not completely sure.
|
||||||
|
|
||||||
|
os/inputthread.c | 1 +
|
||||||
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
|
diff --git a/os/inputthread.c b/os/inputthread.c
|
||||||
|
index 721e86312..dc4eb9f20 100644
|
||||||
|
--- a/os/inputthread.c
|
||||||
|
+++ b/os/inputthread.c
|
||||||
|
@@ -497,6 +497,7 @@ InputThreadFini(void)
|
||||||
|
|
||||||
|
/* Close the pipe to get the input thread to shut down */
|
||||||
|
close(hotplugPipeWrite);
|
||||||
|
+ input_force_unlock();
|
||||||
|
pthread_join(inputThreadInfo->thread, NULL);
|
||||||
|
|
||||||
|
xorg_list_for_each_entry_safe(dev, next, &inputThreadInfo->devs, node) {
|
||||||
|
--
|
||||||
|
2.12.3
|
||||||
|
|
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Nov 14 09:57:04 UTC 2017 - msrb@suse.com
|
||||||
|
|
||||||
|
- u_os-inputthread-Force-unlock-when-stopping-thread.patch
|
||||||
|
* Prevent dead lock if terminating while on inactive VT.
|
||||||
|
(bnc#1062977)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Oct 12 21:13:38 UTC 2017 - tobias.johannes.klausmann@mni.thm.de
|
Thu Oct 12 21:13:38 UTC 2017 - tobias.johannes.klausmann@mni.thm.de
|
||||||
|
|
||||||
|
@ -206,6 +206,7 @@ Patch209: u_pci-primary-Fix-up-primary-PCI-device-detection-for-the-platfr
|
|||||||
Patch210: u_os-connections-Check-for-stale-FDs.patch
|
Patch210: u_os-connections-Check-for-stale-FDs.patch
|
||||||
|
|
||||||
Patch215: u_Use-better-fallbacks-to-generate-cookies-if-arc4rand.patch
|
Patch215: u_Use-better-fallbacks-to-generate-cookies-if-arc4rand.patch
|
||||||
|
Patch216: u_os-inputthread-Force-unlock-when-stopping-thread.patch
|
||||||
|
|
||||||
Patch1000: n_xserver-optimus-autoconfig-hack.patch
|
Patch1000: n_xserver-optimus-autoconfig-hack.patch
|
||||||
|
|
||||||
@ -340,6 +341,7 @@ sh %{SOURCE92} --verify . %{SOURCE91}
|
|||||||
#%patch210 -p1
|
#%patch210 -p1
|
||||||
|
|
||||||
%patch215 -p1
|
%patch215 -p1
|
||||||
|
%patch216 -p1
|
||||||
|
|
||||||
### disabled for now
|
### disabled for now
|
||||||
#%patch1000 -p1
|
#%patch1000 -p1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user