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:   Thu, 11 Jan 2018 14:50:02 +0800
From:   Yunlong Song <yunlong.song@...wei.com>
To:     Daeho Jeong <daeho.jeong@...sung.com>,
        <linux-kernel@...r.kernel.org>,
        <linux-f2fs-devel@...ts.sourceforge.net>
CC:     <heyunlei@...wei.com>, <yuchao0@...wei.com>,
        Jaegeuk Kim <jaegeuk@...nel.org>
Subject: Re: [PATCH v2] f2fs: handle newly created page when revoking inmem
 pages

Should it be "When committing inmem pages is not successful" ?

On 2018/1/11 8:17, Daeho Jeong wrote:
> When committing inmem pages is successful, we revoke already committed
> blocks in __revoke_inmem_pages() and finally replace the committed
> ones with the old blocks using f2fs_replace_block(). However, if
> the committed block was newly created one, the address of the old
> block is NEW_ADDR and __f2fs_replace_block() cannot handle NEW_ADDR
> as new_blkaddr properly and a kernel panic occurrs.
> 
> Signed-off-by: Daeho Jeong <daeho.jeong@...sung.com>
> Tested-by: Shu Tan <shu.tan@...sung.com>
> Reviewed-by: Chao Yu <yuchao0@...wei.com>
> ---
>   fs/f2fs/segment.c | 6 +++++-
>   1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
> index c117e09..0673d08 100644
> --- a/fs/f2fs/segment.c
> +++ b/fs/f2fs/segment.c
> @@ -248,7 +248,11 @@ static int __revoke_inmem_pages(struct inode *inode,
>   				goto next;
>   			}
>   			get_node_info(sbi, dn.nid, &ni);
> -			f2fs_replace_block(sbi, &dn, dn.data_blkaddr,
> +			if (cur->old_addr == NEW_ADDR) {
> +				invalidate_blocks(sbi, dn.data_blkaddr);
> +				f2fs_update_data_blkaddr(&dn, NEW_ADDR);
> +			} else
> +				f2fs_replace_block(sbi, &dn, dn.data_blkaddr,
>   					cur->old_addr, ni.version, true, true);
>   			f2fs_put_dnode(&dn);
>   		}
> 

-- 
Thanks,
Yunlong Song

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ