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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 29 Oct 2013 16:43:17 +0900
From:	Jaegeuk Kim <jaegeuk.kim@...sung.com>
To:	"shifei10.ge" <shifei10.ge@...sung.com>
Cc:	'??' <shu.tan@...sung.com>, linux-fsdevel@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	linux-f2fs-devel@...ts.sourceforge.net
Subject: RE: [f2fs-dev] [PATCH] f2fs:fix truncate_partial_nodes bug

Hi,

2013-10-29 (화), 15:32 +0800, shifei10.ge:
> Hi,I think we don't need to put the invalid page that get_node_page returned.
> So I add " idx = i--" based on your version.Following is the patch: 
> 
> ---
>  fs/f2fs/node.c |   13 +++++++------
>  1 file changed, 7 insertions(+), 6 deletions(-)
> 
> diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
> index 304d5ce..fd5f721 100644
> --- a/fs/f2fs/node.c
> +++ b/fs/f2fs/node.c
> @@ -631,19 +631,19 @@ static int truncate_partial_nodes(struct dnode_of_data *dn,
>  		return 0;
>  
>  	/* get indirect nodes in the path */
> -	for (i = 0; i < depth - 1; i++) {
> +	for (i = 0; i < idx + 1; i++) {
>  		/* refernece count'll be increased */
>  		pages[i] = get_node_page(sbi, nid[i]);
>  		if (IS_ERR(pages[i])) {
> -			depth = i + 1;
>  			err = PTR_ERR(pages[i]);
> +			idx = i--;

You meant (idx = i - 1)?
If so, idx = i--; is wrong.

-- 
Jaegeuk Kim
Samsung

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