Re: [PATCH] mm: honor FOLL_GET flag in follow_hugetlb_page v2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, May 7, 2013 at 8:47 PM, KOSAKI Motohiro
<kosaki.motohiro@xxxxxxxxx> wrote:
> On Tue, May 7, 2013 at 6:58 PM,  <j.glisse@xxxxxxxxx> wrote:
>> From: Jerome Glisse <jglisse@xxxxxxxxxx>
>>
>> Do not increase page count if FOLL_GET is not set. None of the
>> current user can trigger the issue because none of the current
>> user call __get_user_pages with both the pages array ptr non
>> NULL and the FOLL_GET flags non set in other word all caller
>> of __get_user_pages that don't set the FOLL_GET flags also call
>> with pages == NULL.
>
> Because, __get_user_pages() doesn't allow pages==NULL and FOLL_GET is on.

Yes but this allow pages != NULL and FOLL_GET not set and as i said
there is no such user of that yet and this is exactly what i was
trying to use.

Cheers,
Jerome

>
> long __get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
> {
> (snip)
>     VM_BUG_ON(!!pages != !!(gup_flags & FOLL_GET));

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]