what do you mean? You mean like this:
asmlinkage int sys_pipe(unsigned long * fildes)
{
int fd[2] = {-1, -1};
int error;
lock_kernel();
error = do_pipe(fd);
unlock_kernel();
if (!error) {
if (copy_to_user(fildes, fd, 2*sizeof(int)))
error = -EFAULT;
}
return error;
}
so what? if the user does pipe(0) she will still leak two descriptors (and
files and inodes and any other resources), won't she? I just verified this
to make sure I am not blindly missing something obvious...
So, please clarify what you mean and how it will solve the resource leak
caused by pipe(NULL) call?
Regards,
Tigran.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/