On Mon, 18 Jan 2010 11:15:38 +0800 "Wu, Fengguang" <fengguang.wu@xxxxxxxxx> wrote: > Hi, > > [replying from webmail, sorry for top-posting] > > memory_lseek() calls force_successful_syscall_return() to force success on negative vals. > However that is a no-op for x86. > > My experiment shows that lseek() does return negative pos. However, > manual says that "a value of (off_t) -1 is returned" on error. So it's OK > as long as your program is written as "err == -1" instead of "err < 0". > On error, the kernel returns -EOVERFLOW (via %eax) and libc hides it by errno = EOVERFLOW ret = -1 The problem discussed here is the kernel's return value. So, the kernel's lseek should check that, I think. Anyway, this lseek problem is not related to this patch itself and has existed for very long time. Fixing it later by another patch is not very bad, I think. (I'm sorry I myself is not ready for writing a patch...) Thaks, -Kame -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html