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] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.00.1106091112560.4138@dhcp-27-109.brq.redhat.com>
Date:	Thu, 9 Jun 2011 11:24:44 +0200 (CEST)
From:	Lukas Czerner <lczerner@...hat.com>
To:	Shaohua Li <shaohua.li@...el.com>
cc:	linux-ext4@...r.kernel.org, "Ted Ts'o" <tytso@....edu>
Subject: Re: [patch]check NULL pointer

On Thu, 9 Jun 2011, Shaohua Li wrote:

> orig_data could be NULL.

Now, that is the commit description :). Could you please be more
descriptive in the "descritpion" ? Also the subject is not right either,
please see Documentation/SubmittingPatches

Thanks!
-Lukas

> 
> Signed-off-by: Shaohua Li <shaohua.li@...el.com>
> 
> diff --git a/fs/ext4/super.c b/fs/ext4/super.c
> index cc5c157..45fc255 100644
> --- a/fs/ext4/super.c
> +++ b/fs/ext4/super.c
> @@ -3057,6 +3057,8 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
>  	unsigned int journal_ioprio = DEFAULT_JOURNAL_IOPRIO;
>  	ext4_group_t first_not_zeroed;
>  
> +	if (!orig_data)
> +		return ret;

Again no data, no reason for backing off.

>  	sbi = kzalloc(sizeof(*sbi), GFP_KERNEL);
>  	if (!sbi)
>  		goto out_free_orig;
> @@ -4285,6 +4287,8 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data)
>  #endif
>  	char *orig_data = kstrdup(data, GFP_KERNEL);
>  
> +	if (!orig_data)
> +		return -ENOMEM;


This does not seem right, it there is no data we will end with ENOMEM
for no reason.

>  	/* Store the original options */
>  	lock_super(sb);
>  	old_sb_flags = sb->s_flags;
> 
> 
> --
> 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
> 

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