Another mmap / jffs2 problem (was RE: 2.5.59-rmk1: unmap_vmas: VMA list is not sorted correctly!)
David Woodhouse
dwmw2 at infradead.org
Fri Mar 7 01:53:36 EST 2003
On Fri, 2003-03-07 at 01:30, Christopher Hoover wrote:
> > This is a long standing problem - and, has been reported many times
> > here. I don't remember the details, but I seem to remember that
> > pppd is buggy.
>
> Ah. I looked at the code -- it seems that someone thought that mmap(2)
> returns 0 on error. A couple of checks for -1 fixed it. I'll forward a
> patch to the maintainers (attached here for anyone encountering this
> problem who finds this note).
I already bugged paulus about it last year sometime.
> Incidentally why does the mmap fail with EINVAL against a jffs2 file and
> succeed against a tmpfs file? Is that by design?
Yes. We don't do shared writable mmap.
Except briefly in 2.5.5something where Linus broke the sys_mmap() logic
so it'd _appear_ to succeed but in fact give you a read-only mmap, and
then the process would die upon trying to write to it.
We fixed it -- I didn't track the fix so it might not have got applied.
I think it's in the archives of both lists. Look for posts from Andrew
Morton.
--
dwmw2
More information about the linux-mtd
mailing list