mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-28 21:33:52 +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
1 changed files with 4 additions and 0 deletions
|
@ -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 a new issue