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] [day] [month] [year] [list]
Date:	Thu, 06 Jun 2013 18:13:53 +0800
From:	Miao Xie <miaox@...fujitsu.com>
To:	naota@...sp.net
CC:	Chris Mason <chris.mason@...ionio.com>,
	linux-btrfs@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] btrfs: Drop inode if inode root is NULL

On 	thu, 06 Jun 2013 18:56:34 +0900, naota@...sp.net wrote:
> There is a path where btrfs_drop_inode() is called with its inode's root
> is NULL: In btrfs_new_inode(), when btrfs_set_inode_index() fails,
> iput() is called. We should handle this case before taking look at the
> root->root_item.
> 
> Signed-off-by: Naohiro Aota <naota@...sp.net>

Reviewed-by: Miao Xie <miaox@...fujitsu.com>

> ---
>  fs/btrfs/inode.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
> index af978f7..17f3064 100644
> --- a/fs/btrfs/inode.c
> +++ b/fs/btrfs/inode.c
> @@ -8012,6 +8012,9 @@ int btrfs_drop_inode(struct inode *inode)
>  {
>  	struct btrfs_root *root = BTRFS_I(inode)->root;
>  
> +	if (root == NULL)
> +		return 1;
> +
>  	/* the snap/subvol tree is on deleting */
>  	if (btrfs_root_refs(&root->root_item) == 0 &&
>  	    root != root->fs_info->tree_root)
> 

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