[lkml]   [2003]   [Aug]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [parisc-linux] Re: Problems with kernel mmap (failing tst-mmap-eofsync in glibc on parisc)
On Fri, 22 Aug 2003 10:36:34 -0700
"David S. Miller" <> wrote:

> On Fri, 22 Aug 2003 18:41:03 +0100
> Matthew Wilcox <> wrote:
> > Uhm. So what happens when the user has stored into the page and now
> > the kernel wants to read from it? There's still data in the cache for
> > the user mapping that's non-coherent with the kernel mapping.
> I see. This causes the page cache read flush_dcache_page() call
> not to trigger.

Wait, I'm confused again.

How can the user "write" to the mmap()'d side if PROT_WRITE
was not specified? That is the only case in which the proposed
patch could make a difference, we check this:

switch (flags & MAP_TYPE) {
if ((prot&PROT_WRITE) && !(file->f_mode&FMODE_WRITE))
return -EACCES;

Therefore if the user can write to the page, file->f_mode will
have the write bit set too.

So the proposed patch looks bogus to me.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:48    [W:0.073 / U:0.456 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site