Skip to content

Commit

Permalink
xen/privcmd: Mark pages as dirty
Browse files Browse the repository at this point in the history
pages need to be marked as dirty before unpinned it in
unlock_pages() which was oversight. This is fixed now.

Signed-off-by: Souptick Joarder <[email protected]>
Suggested-by: John Hubbard <[email protected]>
Reviewed-by: Juergen Gross <[email protected]>
Reviewed-by: Paul Durrant <[email protected]>
Cc: John Hubbard <[email protected]>
Cc: Boris Ostrovsky <[email protected]>
Cc: Paul Durrant <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Juergen Gross <[email protected]>
  • Loading branch information
Souptick Joarder authored and jgross1 committed Aug 3, 2020
1 parent e398fb4 commit a0c34d2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/xen/privcmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a0c34d2

Please sign in to comment.