Re: [PATCH] fbmem.c on 2.3.25 (had trouble with the other one)

Mordechai T. Abzug (morty@sanctuary.arbutus.md.us)
Wed, 3 Nov 1999 14:37:10 -0500


On Wed, Nov 03, 1999 at 02:19:04PM -0500, kernel@kvack.org wrote:
> On Wed, 3 Nov 1999, Mordechai T. Abzug wrote:

> > - if (vma->vm_offset >= len) {
> > + if (vma->vm_pgoff << PAGE_SHIFT >= len) {

> This is better, but still wrong. What happens when shifting vm_pgoff
> overflows the unsigned long? This will be possible -- it's why the
> changes were done in the first place.

Ah, thanks for the explanation. In that case, why was this shifting
done elsewhere in patch-2.3.25? Ie. in linux/drivers/char/mem.c,
linux/fs/ncpfs/mmap.c, and others? linux/drivers/char/mem.c involves
an unsigned long, linux/fs/ncpfs/mmap.c involves an int. Is this a
bug in those places, or is there some reason why this was not a
problem over there?

- Morty "I am but a grasshopper"

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