> -----Original Message-----
> From: Souptick Joarder <[email protected]>
> Sent: 12 July 2020 04:40
> To: [email protected]; [email protected]; [email protected]
> Cc: [email protected]; [email protected]; Souptick 
> Joarder
> <[email protected]>; John Hubbard <[email protected]>; Paul Durrant 
> <[email protected]>
> Subject: [PATCH v3 2/3] 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 <[email protected]>
> Suggested-by: John Hubbard <[email protected]>
> Reviewed-by: Juergen Gross <[email protected]>
> Cc: John Hubbard <[email protected]>
> Cc: Boris Ostrovsky <[email protected]>
> Cc: Paul Durrant <[email protected]>

Reviewed-by: Paul Durrant <[email protected]>

> ---
>  drivers/xen/privcmd.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/xen/privcmd.c b/drivers/xen/privcmd.c
> index b001673..079d35b 100644
> --- a/drivers/xen/privcmd.c
> +++ b/drivers/xen/privcmd.c
> @@ -611,8 +611,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)
> --
> 1.9.1



Reply via email to