[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH v3 02/21] xen/grant-table: never put a reserved grant on the free list
Make sure a reserved grant is never put on the free list, as this could cause hard to debug errors. Signed-off-by: Juergen Gross <jgross@xxxxxxxx> --- V3: - new patch --- drivers/xen/grant-table.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/xen/grant-table.c b/drivers/xen/grant-table.c index 6ea31ea26008..1a1aec0a88a1 100644 --- a/drivers/xen/grant-table.c +++ b/drivers/xen/grant-table.c @@ -207,6 +207,10 @@ static inline void check_free_callbacks(void) static void put_free_entry(grant_ref_t ref) { unsigned long flags; + + if (unlikely(ref < GNTTAB_NR_RESERVED_ENTRIES)) + return; + spin_lock_irqsave(&gnttab_list_lock, flags); gnttab_entry(ref) = gnttab_free_head; gnttab_free_head = ref; -- 2.35.3
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |