lkml.org 
[lkml]   [2007]   [Jul]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] mm: recheck lock rlim after f_op->mmap() method
On 10:32 Срд 11 Июл     , Christoph Hellwig wrote:
> On Tue, Jul 10, 2007 at 06:27:05PM +0100, Hugh Dickins wrote:
> > On Mon, 9 Jul 2007, Dmitry Monakhov wrote:
> > > Some device drivers can change vm_flags in their f_op->mmap
> > > method. In order to be on the safe side we have to recheck
> > > lock rlimit. Now we have to check lock rlimit from two places,
> > > let's move this common code to helper functon.
> > >
> > > Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
> > > ---
> > > mm/mmap.c | 33 ++++++++++++++++++++++++++-------
> > > 1 files changed, 26 insertions(+), 7 deletions(-)
> >
> > Or would this simpler patch be the right one? I suspect the
> > mspec driver only says VM_LOCKED because of a deep-seated but
> > irrational fear that its pages might fall into reclaim.
>
> Looks good. We probably should add a debug check to do_mmap_pgoff
> so that ->mmap methods don't change flags that are not for drivers.
As result fglrx totally goes crazy, because it change vm_flags
even from ->nopage() calback :)
>

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-07-11 12:15    [W:0.077 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site