mirror of
https://github.com/torvalds/linux.git
synced 2024-11-24 05:02:12 +00:00
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@suse.com> Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com> Signed-off-by: Juergen Gross <jgross@suse.com>
This commit is contained in:
parent
79c22318f8
commit
8c9eb0e373
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user