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]
Message-ID: <20121006185921.GI2616@ZenIV.linux.org.uk>
Date:	Sat, 6 Oct 2012 19:59:21 +0100
From:	Al Viro <viro@...IV.linux.org.uk>
To:	????????? <jaegeuk.kim@...sung.com>
Cc:	'Theodore Ts'o' <tytso@....edu>, gregkh@...uxfoundation.org,
	linux-kernel@...r.kernel.org, chur.lee@...sung.com,
	cm224.lee@...sung.com, jooyoung.hwang@...sung.com
Subject: Re: [PATCH 11/16] f2fs: add inode operations for special inodes

On Fri, Oct 05, 2012 at 09:03:09PM +0900, ????????? wrote:
> +static int f2fs_create(struct inode *dir, struct dentry *dentry, umode_t mode,
> +						bool excl)
> +{
> +	struct super_block *sb = dir->i_sb;
> +	struct f2fs_sb_info *sbi = F2FS_SB(sb);
> +	struct inode *inode;
> +	nid_t ino = 0;
> +	int err;
> +
> +	if (dentry->d_name.len > F2FS_MAX_NAME_LEN)
> +		return -ENAMETOOLONG;

Pointless - failing those on ->lookup() with ENAMETOOLONG is enough.
The same goes for all entry creation methods.

> +	if (inode->i_nlink >= F2FS_LINK_MAX)
> +		return -EMLINK;

Just set ->s_max_links and be done with that.

> +	if (dir->i_nlink >= F2FS_LINK_MAX)
> +		return err;

Ditto.

> +		if (old_dir_entry) {
> +			err = -EMLINK;
> +			if (new_dir->i_nlink >= F2FS_LINK_MAX)
> +				goto out_dir;

... and here as well.
--
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