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] [day] [month] [year] [list]
Date:	Thu, 11 Feb 2016 10:52:14 +0800
From:	"Yan, Zheng" <zyan@...hat.com>
To:	Anton Protopopov <a.s.protopopov@...il.com>
Cc:	Sage Weil <sage@...hat.com>, Ilya Dryomov <idryomov@...il.com>,
	ceph-devel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ceph: fix a wrong comparison


> On Feb 11, 2016, at 01:38, Anton Protopopov <a.s.protopopov@...il.com> wrote:
> 
> A negative value rc compared to the positive value ENOENT in the
> finish_read() function.
> 
> Signed-off-by: Anton Protopopov <a.s.protopopov@...il.com>
> ---
> fs/ceph/addr.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c
> index c222137..1b809c9 100644
> --- a/fs/ceph/addr.c
> +++ b/fs/ceph/addr.c
> @@ -276,7 +276,7 @@ static void finish_read(struct ceph_osd_request *req, struct ceph_msg *msg)
> 	for (i = 0; i < num_pages; i++) {
> 		struct page *page = osd_data->pages[i];
> 
> -		if (rc < 0 && rc != ENOENT)
> +		if (rc < 0 && rc != -ENOENT)
> 			goto unlock;
> 		if (bytes < (int)PAGE_CACHE_SIZE) {
> 			/* zero (remainder of) page */

Good catch, thanks

Yan, Zheng

> -- 
> 2.6.5
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ