mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-15 16:24:13 +08:00
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: Souptick Joarder <jrdr.linux@gmail.com> Suggested-by: John Hubbard <jhubbard@nvidia.com> Reviewed-by: Juergen Gross <jgross@suse.com> Reviewed-by: Paul 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.com Signed-off-by: Juergen Gross <jgross@suse.com>
This commit is contained in:
parent
e398fb4bdf
commit
a0c34d2251
@ -612,9 +612,12 @@ 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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user