On Fri, May 3, 2019 at 2:12 AM Jan Beulich <jbeul...@suse.com> wrote:
>
> >>> On 03.05.19 at 00:13, <ta...@tklengyel.com> wrote:
> > @@ -1002,7 +989,10 @@ static int share_pages(struct domain *sd, gfn_t sgfn, 
> > shr_handle_t sh,
> >      /* Free the client page */
> >      if(test_and_clear_bit(_PGC_allocated, &cpage->count_info))
> >          put_page(cpage);
> > -    put_page(cpage);
> > +
> > +    BUG_ON(!put_count);
> > +    while ( put_count-- )
> > +        put_page_and_type(cpage);
>
> Strictly speaking I think the BUG_ON() should be moved ahead of the
> if() in context, so that a problematic put_page() would not get
> executed in the first place (even if the system is to die soon after).

I don't follow - where is the problematic put_page()? And why is it problematic?

Tamas

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to