Please don't drop CCs.

Qi, Yanling <[EMAIL PROTECTED]> wrote:
>
>> Qi, Yanling <[EMAIL PROTECTED]> wrote:
>> > @@ -2571,6 +2572,13 @@ sg_page_malloc(int rqSz, int lowDma, int
>> >                resp = (char *) __get_free_pages(page_mask, order);
>> > /* try half */
>> >                resSz = a_size;
>> >        }
>> > +       tmppage = virt_to_page(resp);
>> > +       for( m = PAGE_SIZE; m < resSz; m += PAGE_SIZE )
>> > +       {
>> > +               tmppage++;
>> > +               SetPageReserved(tmppage);
>> > +       }
>> > +
>> 
> [Qi, Yanling]
> If I do a get_page() at sg_page_malloc() time and then do a put_page()
> at sg_page_free() time, I worry about a race condition that the page
> gets re-used before calling free_pages().

Could you explain what is going to cause this page to be reused if it
has a non-zero reference count?

Thanks,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to