diff options
author | Dan Carpenter <[email protected]> | 2010-03-23 13:35:42 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2010-03-24 16:31:22 -0700 |
commit | 4fd2c20d964a8fb9861045f1022475c9d200d684 (patch) | |
tree | ff062c1c775a085851a38c77a81c6907fdade35d | |
parent | c6b6ef8bb05af632889c5536513b9f4004961f73 (diff) |
kcore: fix test for end of list
"m" is never NULL here. We need a different test for the end of list
condition.
Signed-off-by: Dan Carpenter <[email protected]>
Acked-by: KAMEZAWA Hiroyuki <[email protected]>
Acked-by: WANG Cong <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r-- | fs/proc/kcore.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/proc/kcore.c b/fs/proc/kcore.c index a44a7897fd4d..b442dac8f5f9 100644 --- a/fs/proc/kcore.c +++ b/fs/proc/kcore.c @@ -490,7 +490,7 @@ read_kcore(struct file *file, char __user *buffer, size_t buflen, loff_t *fpos) } read_unlock(&kclist_lock); - if (m == NULL) { + if (&m->list == &kclist_head) { if (clear_user(buffer, tsz)) return -EFAULT; } else if (is_vmalloc_or_module_addr((void *)start)) { |