|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] [xen-unstable] minios: fix gnttab allocation boundary
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1213778291 -3600
# Node ID a1c98534418bc09abc2fa970200248f6e4723127
# Parent 75e60df67e360c95e8360787e599032604d677bd
minios: fix gnttab allocation boundary
The gnttab_sem is already fed during initialization's put_free_entry
loop.
Signed-off-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxxx>
---
extras/mini-os/gnttab.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletion(-)
diff -r 75e60df67e36 -r a1c98534418b extras/mini-os/gnttab.c
--- a/extras/mini-os/gnttab.c Wed Jun 18 09:37:40 2008 +0100
+++ b/extras/mini-os/gnttab.c Wed Jun 18 09:38:11 2008 +0100
@@ -35,7 +35,7 @@ static grant_ref_t gnttab_list[NR_GRANT_
#ifdef GNT_DEBUG
static char inuse[NR_GRANT_ENTRIES];
#endif
-static __DECLARE_SEMAPHORE_GENERIC(gnttab_sem, NR_GRANT_ENTRIES);
+static __DECLARE_SEMAPHORE_GENERIC(gnttab_sem, 0);
static void
put_free_entry(grant_ref_t ref)
@@ -60,6 +60,7 @@ get_free_entry(void)
down(&gnttab_sem);
local_irq_save(flags);
ref = gnttab_list[0];
+ BUG_ON(ref < NR_RESERVED_ENTRIES || ref >= NR_GRANT_ENTRIES);
gnttab_list[0] = gnttab_list[ref];
#ifdef GNT_DEBUG
BUG_ON(inuse[ref]);
_______________________________________________
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] minios: fix gnttab allocation boundary,
Xen patchbot-unstable <=
|
|
|
|
|