diff options
author | David Vrabel <david.vrabel@citrix.com> | 2014-09-02 10:21:30 -0400 |
---|---|---|
committer | David Vrabel <david.vrabel@citrix.com> | 2014-09-04 08:14:05 -0400 |
commit | 5903c6bd1a48d90b99e207ec2a6a7673cbbb732d (patch) | |
tree | f9e12fe0547957d77ca1c803da954999741794ae /drivers/net/wireless/ath/ath9k/pci.c | |
parent | e9de2e5fd602c4f5ddf212d3837b19ad4f5878ad (diff) |
xen/gntalloc: safely delete grefs in add_grefs() undo path
If a gref could not be added (perhaps because the limit has been
reached or there are no more grant references available), the undo
path may crash because __del_gref() frees the gref while it is being
used for a list iteration.
A comment suggests that using list_for_each_entry() is safe since the
gref isn't removed from the list being iterated over, but it is freed
and thus list_for_each_entry_safe() must be used.
Also, explicitly delete the gref from the local per-file list, even
though this is not strictly necessary.
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/pci.c')
0 files changed, 0 insertions, 0 deletions