The patch titled parisc: sync compat getdents has been added to the -mm tree. Its filename is parisc-sync-compat-getdents-on-ia64-and-parisc.patch *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: parisc: sync compat getdents From: Alexandr Andreev <aandreev@xxxxxxxxxx> Add VERIFY_WRITE check in the beginning like compat_sys_getdents() EFAULT on parisc if put_user() fails. Signed-off-by: Alexandr Andreev <aandreev@xxxxxxxxxx> Signed-off-by: Alexey Dobriyan <adobriyan@xxxxxxxxxx> Cc: Kyle McMartin <kyle@xxxxxxxxxxx> Cc: Matthew Wilcox <willy@xxxxxxxxxx> Cc: Grant Grundler <grundler@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- arch/parisc/kernel/sys_parisc32.c | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) diff -puN arch/ia64/ia32/sys_ia32.c~parisc-sync-compat-getdents-on-ia64-and-parisc arch/ia64/ia32/sys_ia32.c diff -puN arch/parisc/kernel/sys_parisc32.c~parisc-sync-compat-getdents-on-ia64-and-parisc arch/parisc/kernel/sys_parisc32.c --- a/arch/parisc/kernel/sys_parisc32.c~parisc-sync-compat-getdents-on-ia64-and-parisc +++ a/arch/parisc/kernel/sys_parisc32.c @@ -350,6 +350,10 @@ sys32_getdents (unsigned int fd, void __ struct getdents32_callback buf; int error; + error = -EFAULT; + if (!access_ok(VERIFY_WRITE, dirent, count)) + goto out; + error = -EBADF; file = fget(fd); if (!file) @@ -366,8 +370,10 @@ sys32_getdents (unsigned int fd, void __ error = buf.error; lastdirent = buf.previous; if (lastdirent) { - put_user(file->f_pos, &lastdirent->d_off); - error = count - buf.count; + if (put_user(file->f_pos, &lastdirent->d_off)) + error = -EFAULT; + else + error = count - buf.count; } out_putf: _ Patches currently in -mm which might be from aandreev@xxxxxxxxxx are ia64-sync-compat-getdents-on-ia64-and-parisc.patch parisc-sync-compat-getdents-on-ia64-and-parisc.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html