Re: mmap() on cdrom files fails in 2.6.9-rc2-mmX

From: Bill Davidsen
Date: Thu Sep 30 2004 - 13:53:56 EST


Jean Delvare wrote:
Hi all,

(Please CC me on reply, I am not subscribed to the LKML.)

I think I found a bug in 2.6.9-rc2-mm4. It doesn't seem to be able to
mmap() files located on cdroms. Same problem with -mm3 and -mm1.
2.6.9-rc2 works fine. I reproduced it on two completely different
systems, so I guess it isn't device dependant.

I tried to get mmap() to fail on other files with similar properties
(different owner, read only) but it won't. The problem seems to affect
only files located on cdroms.

I also tried on a loop device-mounted cdrom image, in case the problem
was related to the iso9660 filesystem. The problem wouldn't show. It
seems to fail only on real cdroms.

I searched the broken-out directory but wouldn't find any candidate to
backout.

Is your mmap length a multiple of 2k? If not please resize and try again. There is some less traveled code when physical sector size is not 512 bytes.

Yes, this is a wild guess, but it's easy to test if you have the kernel built.

--
-bill davidsen (davidsen@xxxxxxx)
"The secret to procrastination is to put things off until the
last possible moment - but no longer" -me
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/