[PATCH 4/6] [RFC] Split do_linkat() out of sys_linkat

Oren Laadan orenl at cs.columbia.edu
Wed Sep 29 13:28:49 PDT 2010



Reviewed-by: Oren Laadan <orenl at cs.columbia.edu>
(but see nit below)

On 09/23/2010 05:53 PM, Matt Helsley wrote:
> Separate the __user pathname handling from the bulk of the syscall.
> Since we're doing this to enable relinking of unlinked files by
> sys_checkpoint and not sys_linkat we're not using a sys-wrapper.
>
> Signed-off-by: Matt Helsley<matthltc at us.ibm.com>
> Cc: containers at lists.linux-foundation.org
> Cc: Oren Laadan<orenl at cs.columbia.edu>
> Cc: Amir Goldstein<amir73il at users.sf.net>
> Cc: linux-fsdevel at vger.kernel.org
> Cc: Al Viro<viro at zeniv.linux.org.uk>
> Cc: Christoph Hellwig<hch at infradead.org>
> Cc: Jamie Lokier<jamie at shareable.org>

...

>   /*
>    * Hardlinks are often used in delicate situations.  We avoid
>    * security-related surprises by not following symlinks on the
> @@ -2468,11 +2513,10 @@ int vfs_link(struct dentry *old_dentry, struct inode *dir, struct dentry *new_de
>   SYSCALL_DEFINE5(linkat, int, olddfd, const char __user *, oldname,
>   		int, newdfd, const char __user *, newname, int, flags)
>   {
> -	struct dentry *new_dentry;
>   	struct nameidata nd;
>   	struct path old_path;
> -	int error;
>   	char *to;
> +	int error;

This little piece is unnecessary ;)

[...]


More information about the Containers mailing list