Skip to content

Commit 339f74e

Browse files
committed
Merge tag 'for-linus-5.19a-rc7-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip
Pull xen fix from Juergen Gross: "Fix for the Xen gntdev driver causing inappropriate WARN() messages" * tag 'for-linus-5.19a-rc7-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen/gntdev: Ignore failure to unmap INVALID_GRANT_HANDLE
2 parents fcd1b2b + 166d386 commit 339f74e

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

drivers/xen/gntdev.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -396,13 +396,15 @@ static void __unmap_grant_pages_done(int result,
396396
unsigned int offset = data->unmap_ops - map->unmap_ops;
397397

398398
for (i = 0; i < data->count; i++) {
399-
WARN_ON(map->unmap_ops[offset+i].status);
399+
WARN_ON(map->unmap_ops[offset + i].status != GNTST_okay &&
400+
map->unmap_ops[offset + i].handle != INVALID_GRANT_HANDLE);
400401
pr_debug("unmap handle=%d st=%d\n",
401402
map->unmap_ops[offset+i].handle,
402403
map->unmap_ops[offset+i].status);
403404
map->unmap_ops[offset+i].handle = INVALID_GRANT_HANDLE;
404405
if (use_ptemod) {
405-
WARN_ON(map->kunmap_ops[offset+i].status);
406+
WARN_ON(map->kunmap_ops[offset + i].status != GNTST_okay &&
407+
map->kunmap_ops[offset + i].handle != INVALID_GRANT_HANDLE);
406408
pr_debug("kunmap handle=%u st=%d\n",
407409
map->kunmap_ops[offset+i].handle,
408410
map->kunmap_ops[offset+i].status);

0 commit comments

Comments
 (0)