lkml.org 
[lkml]   [2006]   [Jan]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 5/5] file: Modify struct fown_struct to contain a tref
    Eric W. Biederman wrote:

    > @@ -317,7 +326,9 @@ static long do_fcntl(int fd, unsigned in
    > * current syscall conventions, the only way
    > * to fix this will be in libc.
    > */
    > - err = filp->f_owner.pid;
    > + err = 0;
    > + if (filp->f_owner.tref->task)
    > + err = filp->f_owner.pid;

    Probably not very important, but why don't you use
    filp->f_owner.tref->task->pid? This way you could completely get rid of
    the pid field in fown_struct.

    > --- a/net/socket.c
    > +++ b/net/socket.c
    > @@ -855,7 +855,10 @@ static long sock_ioctl(struct file *file
    > break;
    > case FIOGETOWN:
    > case SIOCGPGRP:
    > - err = put_user(sock->file->f_owner.pid, (int __user *)argp);
    > + pid = 0;
    > + if (sock->file->f_owner.tref->task)
    > + pid = sock->file->f_owner.pid;
    > + err = put_user(pid, (int __user *)argp);

    Same here.

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

    \
     
     \ /
      Last update: 2006-01-29 09:46    [W:0.020 / U:29.560 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site