Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4a76ef036ac415c28d1adbaf2b7a74040b84d4c2 Commit: 4a76ef036ac415c28d1adbaf2b7a74040b84d4c2 Parent: 30fcffed8149df18592b3e006b829232b7b3844f Author: Nick Piggin <[EMAIL PROTECTED]> AuthorDate: Wed Feb 14 12:36:32 2007 +0100 Committer: Linus Torvalds <[EMAIL PROTECTED]> CommitDate: Thu Feb 15 09:57:03 2007 -0800
[PATCH] mincore: fill in results properly Paper bag time. Thanks to Randy for noticing that I didn't actually assign 'present' to anything. Unfortunately my original patch passed the few simple test cases I gave it, purely by coincidence. Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]> --- mm/mincore.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/mm/mincore.c b/mm/mincore.c index 9780097..9c1d0a4 100644 --- a/mm/mincore.c +++ b/mm/mincore.c @@ -125,6 +125,8 @@ static long do_mincore(unsigned long addr, unsigned char *vec, unsigned long pag #endif } } + + vec[i] = present; } pte_unmap_unlock(ptep-1, ptl); @@ -135,6 +137,9 @@ none_mapped: pgoff = linear_page_index(vma, addr); for (i = 0; i < nr; i++, pgoff++) vec[i] = mincore_page(vma->vm_file->f_mapping, pgoff); + } else { + for (i = 0; i < nr; i++) + vec[i] = 0; } return nr; - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html