Re: 2.6.19-rc2-mm1

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

 



On Wednesday, 18 October 2006 21:42, Nick Piggin wrote:
> Cedric Le Goater wrote:
> > Rafael J. Wysocki wrote:
> > 
> >>On Wednesday, 18 October 2006 20:27, Gabriel C wrote:
> >>
> >>>Andrew Morton wrote:
> >>>
> >>>>ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.19-rc2/2.6.19-rc2-mm1/
> >>>>  
> >>>
> >>>Hello,
> >>>
> >>>I got this build error with 2.6.19-rc2-mm1:
> >>>
> >>>CHK include/linux/compile.h
> >>>UPD include/linux/compile.h
> >>>CC init/version.o
> >>>LD init/built-in.o
> >>>LD .tmp_vmlinux1
> >>>mm/built-in.o: In function `xip_file_write':
> >>>(.text+0x19a47): undefined reference to `filemap_copy_from_user'
> >>>make: *** [.tmp_vmlinux1] Error 1
> >>
> >>\metoo
> > 
> > 
> > Here's a fix i sent to andrew.
> > 
> > C.
> > 
> > 
> > Signed-off-by: Cedric Le Goater <[email protected]>
> > ---
> >  mm/filemap_xip.c |    2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > Index: 2.6.19-rc2-mm1/mm/filemap_xip.c
> > ===================================================================
> > --- 2.6.19-rc2-mm1.orig/mm/filemap_xip.c
> > +++ 2.6.19-rc2-mm1/mm/filemap_xip.c
> > @@ -317,7 +317,7 @@ __xip_file_write(struct file *filp, cons
> >  			break;
> >  		}
> >  
> > -		copied = filemap_copy_from_user(page, offset, buf, bytes);
> > +		copied = filemap_copy_from_user_atomic(page, offset, buf, bytes);
> >  		flush_dcache_page(page);
> >  		if (likely(copied > 0)) {
> >  			status = copied;
> 
> This fix will work. You should really call the non atomic version though, just
> so it is clear (and maybe some architectures care).
> 
> Because we must service a fault if it happens here. The fault_in_pages_readable
> and comments are wrong AFAIKS.

So I guess there should be

copied = filemap_copy_from_user_nonatomic(page, offset, buf, bytes); 

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

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux