WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] [Mini-OS] Make wake_up callback-safe

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [Mini-OS] Make wake_up callback-safe
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sat, 24 Nov 2007 19:00:12 -0800
Delivery-date: Sat, 24 Nov 2007 19:00:41 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1195910879 0
# Node ID 2fd1ead7fdf59ddf999820a76991c51fcc001b95
# Parent  fb7b96a980f60de93669cfb68b4e9da61ae413e3
[Mini-OS] Make wake_up callback-safe

As it may compete with event handlers waking wait queues, wake_up
needs to be callback-safe.

Signed-off-by: Samuel Thibault <samuel.thibault@xxxxxxxxxx>
---
 extras/mini-os/include/wait.h |    3 +++
 1 files changed, 3 insertions(+)

diff -r fb7b96a980f6 -r 2fd1ead7fdf5 extras/mini-os/include/wait.h
--- a/extras/mini-os/include/wait.h     Sat Nov 24 13:27:32 2007 +0000
+++ b/extras/mini-os/include/wait.h     Sat Nov 24 13:27:59 2007 +0000
@@ -58,13 +58,16 @@ static inline void remove_wait_queue(str
 
 static inline void wake_up(struct wait_queue_head *head)
 {
+    unsigned long flags;
     struct list_head *tmp, *next;
+    local_irq_save(flags);
     list_for_each_safe(tmp, next, &head->thread_list)
     {
          struct wait_queue *curr;
          curr = list_entry(tmp, struct wait_queue, thread_list);
          wake(curr->thread);
     }
+    local_irq_restore(flags);
 }
 
 #define add_waiter(w, wq) do {  \

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [Mini-OS] Make wake_up callback-safe, Xen patchbot-unstable <=