Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
drivers: xen: gnttab: prevent double-free for grant refs
Grant references are allocated with simple O(1) allocator, where every next free gref is stored in previous and first free gref is always stored in 0 element. Current implementation had a possibility for double-free of some gref, because it did not store any information about entries being claimed. It may led to invalid gref_list value. Add GNTTAB_GREF_USED value and mark all taken value to prevent double free in put_grant_entry(). Signed-off-by: Dmytro Firsov <[email protected]>
- Loading branch information