Ameya,
>
> get_page() function has following check inside it:
> VM_BUG_ON(atomic_read(&page->_count) == 0);
>
> Why we need to repeat it again?
> I guess we can completely remove following check which is in my
> opinion completely
> redundant:
-- This check in get_page is conditional check and this is to catch the cases
when page count starts with "0", which I think is still a possible condition if
the user space buffer was never touched. So I am not sure if we can rely on
this.
>
> if (page_count(pg) < 1) {
> }
-- This is to just to extend the check for the bad Page count.
Thank you,
Best regards,
Hari
> -----Original Message-----
> From: Ameya Palande [mailto:[email protected]]
> Sent: Tuesday, April 07, 2009 3:49 PM
> To: Kanigeri, Hari
> Cc: Guzman Lugo, Fernando; Pandita, Vikram; [email protected]
> Subject: Re: [PATCH 1/4] [OMAPZOOM] [UPDATE] DSPBRIDGE: Memory lock for
> DMM.
>
> Hi Hari,
>
> On Tue, Apr 7, 2009 at 11:27 PM, Kanigeri, Hari <[email protected]>
> wrote:
> > Ameya,
> >
> >> If this is the case then what is the point of having following code?
> >> if (page_count(pg) < 1) <-- This will always evaluate to FALSE.
> >
> > -- As you mentioned this case shouldn't be hit. This check is to only to
> ensure that the >translations from user space VA to Physical address is
> taking place correctly and flag the >user if something went bad.
>
> get_page() function has following check inside it:
> VM_BUG_ON(atomic_read(&page->_count) == 0);
>
> Why we need to repeat it again?
> I guess we can completely remove following check which is in my
> opinion completely
> redundant:
>
> if (page_count(pg) < 1) {
> }
>
> Cheers,
> Ameya.
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html