>>>>> "Jes" == Jes Sorensen <[EMAIL PROTECTED]> writes:
>>>>> "Andrew" == Andrew Morton <[EMAIL PROTECTED]> writes: Andrew> This patch causes hiccups on my ia32e box. Andrew> linux:/home/akpm# /usr/sbin/hwscan --isapnp zsh: 7528 Andrew> segmentation fault Jes> Weird, I'll take a look. -EPROGRAMMERISANIDIOT ... try this. Cheers, Jes /dev/mem handle read/write case where ppos+count < PAGE_SIZE Signed-off-by: Jes Sorensen <[EMAIL PROTECTED]> --- ../old/linux-2.6.11-rc5-mm1/drivers/char/mem.c 2005-03-04 07:20:51.000000000 -0500 +++ drivers/char/mem.c 2005-03-04 07:22:20.000000000 -0500 @@ -152,7 +152,9 @@ if (-p & (PAGE_SIZE - 1)) sz = -p & (PAGE_SIZE - 1); else - sz = min_t(unsigned long, PAGE_SIZE, count); + sz = PAGE_SIZE; + + sz = min_t(unsigned long, sz, count); /* * On ia64 if a page has been mapped somewhere as @@ -207,7 +209,9 @@ if (-p & (PAGE_SIZE - 1)) sz = -p & (PAGE_SIZE - 1); else - sz = min_t(unsigned long, PAGE_SIZE, count); + sz = PAGE_SIZE; + + sz = min_t(unsigned long, sz, count); /* * On ia64 if a page has been mapped somewhere as @@ -353,7 +357,9 @@ if (-p & (PAGE_SIZE - 1)) sz = -p & (PAGE_SIZE - 1); else - sz = min_t(unsigned long, PAGE_SIZE, count); + sz = PAGE_SIZE; + + sz = min_t(unsigned long, sz, count); /* * On ia64 if a page has been mapped somewhere as @@ -430,7 +436,9 @@ if (-realp & (PAGE_SIZE - 1)) sz = -realp & (PAGE_SIZE - 1); else - sz = min_t(unsigned long, PAGE_SIZE, count); + sz = PAGE_SIZE; + + sz = min_t(unsigned long, sz, count); /* * On ia64 if a page has been mapped somewhere as - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/