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]
Message-ID: <6ab14932-4b97-021c-4373-9a1aed86ac71@oracle.com>
Date:   Tue, 3 Jan 2023 17:15:11 +0800
From:   Anand Jain <anand.jain@...cle.com>
To:     Tanmay Bhushan <007047221b@...il.com>, Chris Mason <clm@...com>,
        Josef Bacik <josef@...icpanda.com>,
        David Sterba <dsterba@...e.com>, linux-btrfs@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] btrfs: Fix ASSERT of em->len when getting extent

On 12/31/22 23:05, Tanmay Bhushan wrote:
> em->len is incorrectly asserted which is leading to it's
> assignment to sectorsize instead of being check for it.
> 
> Signed-off-by: Tanmay Bhushan <007047221b@...il.com>
> ---
>   fs/btrfs/inode.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
> index 8bcad9940154..e49358048a98 100644
> --- a/fs/btrfs/inode.c
> +++ b/fs/btrfs/inode.c
> @@ -7092,7 +7092,7 @@ struct extent_map *btrfs_get_extent(struct btrfs_inode *inode,
>   		 * Other members are not utilized for inline extents.
>   		 */
>   		ASSERT(em->block_start == EXTENT_MAP_INLINE);
> -		ASSERT(em->len = fs_info->sectorsize);
> +		ASSERT(em->len == fs_info->sectorsize);

Good catch.

Reviewed-by: Anand Jain <anand.jain@...cle.com>

>   
>   		ret = read_inline_extent(inode, path, page);
>   		if (ret < 0)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ