Bug 90862 - Fix for deadlock issue faced in Xorg
Summary: Fix for deadlock issue faced in Xorg
Status: RESOLVED MOVED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/Input/Core (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: medium major
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-05 06:57 UTC by Ritesh
Modified: 2018-12-17 17:28 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
patch for the fix (2.01 KB, text/plain)
2015-06-05 06:57 UTC, Ritesh
no flags Details

Description Ritesh 2015-06-05 06:57:22 UTC
Created attachment 116307 [details]
patch for the fix

Fix for potential deadlock issue in Xorg. Block SIGIO, allocate memory and release SIGIO. 

In case of SIGIO interrupt generated while memory allocation routine (malloc/calloc) is in execution and SIGIO handler in turn try to allocate memory, deadlock can occur. 

This fix is based on version 1.17.1
Comment 1 Chris Wilson 2015-06-05 07:43:46 UTC
The signal handler is not allowed to malloc. The signal handler is not allowed to do a lot of things because they are not reentrant! You have to fix the signal handlers to preallocate and avoid non-sigsafe functions. Please describe the deadlock you see.
Comment 2 Alan Coopersmith 2015-06-05 15:47:19 UTC
Right - allocating memory in a signal handler is never safe - blocking signals
around every place in the X server that does malloc will never work.

Also, patches against the X server are never applied directly from bugzilla.
They *must* be sent to the xorg-devel mailing list for public review - filing
bugs for them in bugzilla is not needed often gets them overlooked.

See http://wiki.x.org/wiki/Development/Documentation/SubmittingPatches/
Comment 3 GitLab Migration User 2018-12-17 17:28:14 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xorg/xserver/issues/594.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.