Re: [PATCH v2] proc: fix races against execve() of /proc/PID/fd**

From: Cyrill Gorcunov
Date: Sun Aug 28 2011 - 05:25:40 EST


On Sat, Aug 27, 2011 at 11:01:47PM +0400, Vasiliy Kulikov wrote:
...
>
> +static int proc_pid_fd_link_getattr(struct vfsmount *mnt, struct dentry *dentry,
> + struct kstat *stat)
> +{
> + struct inode *inode = dentry->d_inode;
> + struct task_struct *task = get_proc_task(inode);
> + int rc;
> +

Are we sure if the task will be always valid here?

if (!task)
return -ENOENT;

Cyrill
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/