diff --git a/fs/proc/kcore.c b/fs/proc/kcore.c index a44a7897fd4d20988aa933a89fab2d9c1600d53a..b442dac8f5f99f5366c55eef420b6fb51120c5f0 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)) {