userfs on 2.2.16 - question about fcheck_task in file.h

From: joel reed (jreed@support.ddiworld.com)
Date: Fri Jun 16 2000 - 08:37:19 EST


i'm trying to get userfs to work on 2.2.16.

as i understand it, userfs uses pipe(2) to create a communication means
between kernel & userland, passes the fd's to kernel userfs.o module
during the mount(2) call and in read_super userfs does a

        if ((toproc = fcheck_task(current,mntinfo->fromkern)) == NULL )
        {
                printk("userfs_read_super: bad fromkern fd %d\n",
                       mntinfo->fromkern);
                goto fail;
        }

AFAICT, the mntinfo struct is correctly passed in and the fd number
is correct, but fcheck_task fails...

from /usr/include/linux/file.h

/*
 * Check whether the specified task has the fd open. Since the task
 * may not have a files_struct, we must test for p->files != NULL.
 */

extern inline struct file * fcheck_task(struct task_struct *p, unsigned int fd)
{
        struct file * file = NULL;

        if (p->files && fd < p->files->max_fds)
                file = p->files->fd[fd];
        return file;
}

does anyone have an idea why an fd made from pipe(2) passed into userfs.o
would not have an associated file as far the kernel is concerned?

thanks for any help.
jr



-
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/



This archive was generated by hypermail 2b29 : Fri Jun 23 2000 - 21:00:11 EST