Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
xen-gnt: prevent adding duplicate gnt callbacks
commit 5f338d9001094a56cf87bd8a280b4e7ff953bb59 upstream. With the current implementation, the callback in the tail of the list can be added twice, because the check done in gnttab_request_free_callback is bogus, callback->next can be NULL if it is the last callback in the list. If we add the same callback twice we end up with an infinite loop, were callback == callback->next. Replace this check with a proper one that iterates over the list to see if the callback has already been added. Signed-off-by: Roger Pau Monné <[email protected]> Cc: Konrad Rzeszutek Wilk <[email protected]> Cc: David Vrabel <[email protected]> Signed-off-by: Konrad Rzeszutek Wilk <[email protected]> Acked-by: Matt Wilson <[email protected]> Reviewed-by: David Vrabel <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: bgn9000 <[email protected]>
- Loading branch information