From: Mike Frysinger Date: Wed, 6 Dec 2006 02:02:59 +0000 (+1000) Subject: [PATCH] uclinux: fix mmap() of directory for nommu case X-Git-Tag: v2.6.20-rc1~34^2~20^2~34 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f81cff0d4067e41fd7383d9c013cc82da7c169d2;p=pandora-kernel.git [PATCH] uclinux: fix mmap() of directory for nommu case I was playing with blackfin when i hit a neat bug ... doing an open() on a directory and then passing that fd to mmap() would cause the kernel to hang after poking into the code a bit more, i found that mm/nommu.c:validate_mmap_request() checks the length and if it is 0, just returns the address ... this is in stark contrast to mmu's mm/mmap.c:do_mmap_pgoff() where it returns -EINVAL for 0 length requests ... i then noticed that some other parts of the logic is out of date between the two funcs, so perhaps that's the easy fix ? Signed-off-by: Greg Ungerer Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed