Commit a0c34d22 authored by Souptick Joarder's avatar Souptick Joarder Committed by Juergen Gross

xen/privcmd: Mark pages as dirty

pages need to be marked as dirty before unpinned it in
unlock_pages() which was oversight. This is fixed now.
Signed-off-by: default avatarSouptick Joarder <jrdr.linux@gmail.com>
Suggested-by: default avatarJohn Hubbard <jhubbard@nvidia.com>
Reviewed-by: default avatarJuergen Gross <jgross@suse.com>
Reviewed-by: default avatarPaul Durrant <paul@xen.org>
Cc: John Hubbard <jhubbard@nvidia.com>
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: Paul Durrant <xadimgnik@gmail.com>
Link: https://lore.kernel.org/r/1594525195-28345-3-git-send-email-jrdr.linux@gmail.comSigned-off-by: default avatarJuergen Gross <jgross@suse.com>
parent e398fb4b
......@@ -612,8 +612,11 @@ static void unlock_pages(struct page *pages[], unsigned int nr_pages)
{
unsigned int i;
for (i = 0; i < nr_pages; i++)
for (i = 0; i < nr_pages; i++) {
if (!PageDirty(pages[i]))
set_page_dirty_lock(pages[i]);
put_page(pages[i]);
}
}
static long privcmd_ioctl_dm_op(struct file *file, void __user *udata)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment