[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen staging] tools/libs: xenforeignmemory_unmap_resource() should be idempotent...
commit 9ac13813d59479ac6c568ae3d838d034ea0ccdc8 Author: Paul Durrant <paul.durrant@xxxxxxxxxx> AuthorDate: Tue Nov 27 16:39:17 2018 +0000 Commit: Wei Liu <wei.liu2@xxxxxxxxxx> CommitDate: Tue Nov 27 16:58:36 2018 +0000 tools/libs: xenforeignmemory_unmap_resource() should be idempotent... ...and is not because linux osdep_xenforeignmemory_unmap_resource() is not. Reported-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Signed-off-by: Paul Durrant <paul.durrant@xxxxxxxxxx> Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx> --- tools/libs/foreignmemory/linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/libs/foreignmemory/linux.c b/tools/libs/foreignmemory/linux.c index 132875df8a..8daa5828e3 100644 --- a/tools/libs/foreignmemory/linux.c +++ b/tools/libs/foreignmemory/linux.c @@ -298,7 +298,7 @@ int osdep_xenforeignmemory_restrict(xenforeignmemory_handle *fmem, int osdep_xenforeignmemory_unmap_resource( xenforeignmemory_handle *fmem, xenforeignmemory_resource_handle *fres) { - return munmap(fres->addr, fres->nr_frames << PAGE_SHIFT); + return fres ? munmap(fres->addr, fres->nr_frames << PAGE_SHIFT) : 0; } int osdep_xenforeignmemory_map_resource( -- generated by git-patchbot for /home/xen/git/xen.git#staging _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |