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:	Wed, 6 Jan 2016 14:05:11 +0100
From:	Jan Kara <jack@...e.cz>
To:	Dan Carpenter <dan.carpenter@...cle.com>
Cc:	Theodore Ts'o <tytso@....edu>, Li Xi <pkuelelixi@...il.com>,
	Andreas Dilger <adilger.kernel@...ger.ca>,
	linux-ext4@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [patch] ext4: checking for NULL instead of IS_ERR

On Wed 06-01-16 13:04:25, Dan Carpenter wrote:
> The dqget() function returns error pointers on error, it doesn't return
> NULL.
> 
> Fixes: 76481d7a60a4 ('ext4: add project quota support')
> Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>

Correct. You can add:

Reviewed-by: Jan Kara <jack@...e.cz>

								Honza

> 
> diff --git a/fs/ext4/super.c b/fs/ext4/super.c
> index 50b2207..103a7a3 100644
> --- a/fs/ext4/super.c
> +++ b/fs/ext4/super.c
> @@ -4844,8 +4844,8 @@ static int ext4_statfs_project(struct super_block *sb,
>  
>  	qid = make_kqid_projid(projid);
>  	dquot = dqget(sb, qid);
> -	if (!dquot)
> -		return -ESRCH;
> +	if (IS_ERR(dquot))
> +		return PTR_ERR(dquot);
>  	spin_lock(&dq_data_lock);
>  
>  	limit = (dquot->dq_dqb.dqb_bsoftlimit ?
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
-- 
Jan Kara <jack@...e.com>
SUSE Labs, CR
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ