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]
Message-ID: <40421bdb-4573-4768-8d6d-39b0d0df9260@huawei.com>
Date: Wed, 28 Aug 2024 20:53:44 +0800
From: Li Zetao <lizetao1@...wei.com>
To: Dan Carpenter <dan.carpenter@...aro.org>
CC: Chris Mason <clm@...com>, Josef Bacik <josef@...icpanda.com>, David Sterba
	<dsterba@...e.com>, <linux-btrfs@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>, <kernel-janitors@...r.kernel.org>
Subject: Re: [PATCH next] btrfs: Fix reversed condition in
 copy_inline_to_page()

Hi Dan,

在 2024/8/27 18:21, Dan Carpenter 写道:
> This if statement is reversed leading to locking issues.
> 
> Fixes: 8e603cfe05f0 ("btrfs: convert copy_inline_to_page() to use folio")
> Signed-off-by: Dan Carpenter <dan.carpenter@...aro.org>
> ---
> This patch is obviously correct but it's from static analysis so additional
> testing would be good as well.
> 
>   fs/btrfs/reflink.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/btrfs/reflink.c b/fs/btrfs/reflink.c
> index 1681d63f03dd..f0824c948cb7 100644
> --- a/fs/btrfs/reflink.c
> +++ b/fs/btrfs/reflink.c
> @@ -146,7 +146,7 @@ static int copy_inline_to_page(struct btrfs_inode *inode,
>   	btrfs_folio_clear_checked(fs_info, folio, file_offset, block_size);
>   	btrfs_folio_set_dirty(fs_info, folio, file_offset, block_size);
>   out_unlock:
> -	if (IS_ERR(folio)) {
> +	if (!IS_ERR(folio)) {
This is a mistake caused by my carelessness,thank you for the patch
>   		folio_unlock(folio);
>   		folio_put(folio);
>   	}

Can I merge your patch into my patchset and add you as a co-author?

Thanks,
Li Zetao.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ