Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 299452 Details for
Bug 429103
Allocations on resume path can cause deadlock due to attempting to swap
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
linux-2.6.18-xen.hg 498:0637d22ed554 backported to 2.6.9-67.0.7.EL (simple s/mutex_unlock/up/ required)
linux-2.6.18-xen-498-0637d22ed554 (text/plain), 2.30 KB, created by
Ian Campbell
on 2008-03-28 11:23:09 UTC
(
hide
)
Description:
linux-2.6.18-xen.hg 498:0637d22ed554 backported to 2.6.9-67.0.7.EL (simple s/mutex_unlock/up/ required)
Filename:
MIME Type:
Creator:
Ian Campbell
Created:
2008-03-28 11:23:09 UTC
Size:
2.30 KB
patch
obsolete
># HG changeset patch ># User Ian Campbell <ian.campbell@citrix.com> ># Date 1206697762 0 ># Node ID 0637d22ed554eb0b9cecc7a74fa0a77a7c456497 ># Parent fdb998e79aba45e27948047f680bf70ca5dddbd9 >Avoid deadlock when unregistering a xenbus watch. > >Watch handlers which run in a separate thread (XBWF_new_thread) should >run without the xenbus_mutex held since kthread_run can block waiting >for memory which causes a deadlock if further watches need to be >unregistered in order to activate the swap device on resume. > >XBWF_new_thread cannot be safely unregistered anyway since the mutex >only protects thread startup. > >Signed-off-by: Ian Campbell <ian.campbell@citrix.com> >linux-2.6.18-xen changeset: 498:0637d22ed554eb0b9cecc7a74fa0a77a7c456497 >linux-2.6.18-xen date: Fri Mar 28 09:49:22 2008 +0000 > >Index: linux-2.6.9-67.0.7.EL/drivers/xen/xenbus/xenbus_xs.c >=================================================================== >--- linux-2.6.9-67.0.7.EL.orig/drivers/xen/xenbus/xenbus_xs.c 2008-03-28 11:07:53.000000000 +0000 >+++ linux-2.6.9-67.0.7.EL/drivers/xen/xenbus/xenbus_xs.c 2008-03-28 11:10:52.000000000 +0000 >@@ -624,6 +624,8 @@ > char token[sizeof(watch) * 2 + 1]; > int err; > >+ BUG_ON(watch->flags & XBWF_new_thread); >+ > sprintf(token, "%lX", (long)watch); > > down_read(&xs_state.suspend_mutex); >@@ -730,16 +732,29 @@ > list_del(ent); > spin_unlock(&watch_events_lock); > >- if (ent != &watch_events) { >- msg = list_entry(ent, struct xs_stored_msg, list); >- if (msg->u.watch.handle->flags & XBWF_new_thread) >- kthread_run(xenwatch_handle_callback, >- msg, "xenwatch_cb"); >- else >- xenwatch_handle_callback(msg); >+ if (ent == &watch_events) { >+ up(&xenwatch_mutex); >+ continue; > } > >- up(&xenwatch_mutex); >+ msg = list_entry(ent, struct xs_stored_msg, list); >+ >+ /* >+ * Unlock the mutex before running an XBWF_new_thread >+ * handler. kthread_run can block which can deadlock >+ * against unregister_xenbus_watch() if we need to >+ * unregister other watches in order to make >+ * progress. This can occur on resume before the swap >+ * device is attached. >+ */ >+ if (msg->u.watch.handle->flags & XBWF_new_thread) { >+ up(&xenwatch_mutex); >+ kthread_run(xenwatch_handle_callback, >+ msg, "xenwatch_cb"); >+ } else { >+ xenwatch_handle_callback(msg); >+ up(&xenwatch_mutex); >+ } > } > > return 0;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 429103
:
291978
|
291979
|
292483
|
298729
|
298730
|
299451
| 299452 |
306545