Re: [PATCH] ext4: fix #11321: create /proc/ext4/*/stats et al more carefully

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Sep 08, 2008 at 10:39:51AM -0400, Theodore Tso wrote:
> --- a/fs/ext4/mballoc.c
> +++ b/fs/ext4/mballoc.c
> @@ -2785,14 +2785,19 @@ static int ext4_mb_init_per_dev_proc(struct super_block *sb)
>  	mode_t mode = S_IFREG | S_IRUGO | S_IWUSR;
>  	struct ext4_sb_info *sbi = EXT4_SB(sb);
>  	struct proc_dir_entry *proc;
> -	char devname[64];
> +	char devname[64], *p;
>  
>  	if (proc_root_ext4 == NULL) {
>  		sbi->s_mb_proc = NULL;
>  		return -EINVAL;
>  	}
>  	bdevname(sb->s_bdev, devname);
> +	while (p = strchr(p, '/'))
> +		*p = '!';

This can't work because "p" is uninitialized. And gcc whines about one
more pair of ().
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux