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:	Mon, 23 Mar 2015 11:37:16 +0800
From:	严正 <zyan@...hat.com>
To:	Taesoo Kim <tsgatesv@...il.com>
Cc:	sage@...hat.com, Ceph Development <ceph-devel@...r.kernel.org>,
	linux-kernel@...r.kernel.org, taesoo@...ech.edu,
	changwoo@...ech.edu, sanidhya@...ech.edu, blee@...ech.edu,
	csong84@...ech.edu
Subject: Re: [PATCH 1/1] ceph: properly release page upon error


> 在 2015年3月21日,05:36,Taesoo Kim <tsgatesv@...il.com> 写道:
> 
> When ceph_update_writeable_page fails (including -EAGAIN), it
> unlocks (w/ unlock_page) the page but does not 'release'
> (w/ page_cache_release) properly.
> 
> Upon error, properly set *pagep to NULL, indicating an error.
> 
> Signed-off-by: Taesoo Kim <tsgatesv@...il.com>
> ---
> fs/ceph/addr.c | 4 ++++
> 1 file changed, 4 insertions(+)
> 
> diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c
> index fd5599d..89091e3 100644
> --- a/fs/ceph/addr.c
> +++ b/fs/ceph/addr.c
> @@ -1146,6 +1146,10 @@ static int ceph_write_begin(struct file *file, struct address_space *mapping,
> 		     inode, page, (int)pos, (int)len);
> 
> 		r = ceph_update_writeable_page(file, pos, len, page);
> +		if (r) {
> +			page_cache_release(page);
> +			*pagep = NULL;
> +		}
> 	} while (r == -EAGAIN);
> 
> 	return r;
> -- 

Added to our testing branch. Thank you

Yan, Zheng
> 

--
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