lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 23 Mar 2010 09:18:41 +0900
From:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
To:	Dan Carpenter <error27@...il.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	WANG Cong <xiyou.wangcong@...il.com>,
	Jiri Slaby <jirislaby@...il.com>,
	Jaswinder Singh Rajput <jaswinderrajput@...il.com>,
	linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [patch] kcore: fix test for end of list

On Mon, 22 Mar 2010 15:05:09 +0300
Dan Carpenter <error27@...il.com> wrote:

> "m" is never NULL here.  We need a different test for the end of list
> condition.
> 
> Signed-off-by: Dan Carpenter <error27@...il.com>

yes, thank you.
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>


> ---
> Found with a static checker and compile tested only.  Please review
> carefully.
> 
> diff --git a/fs/proc/kcore.c b/fs/proc/kcore.c
> index a44a789..b442dac 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)) {
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ