Re: [PATCH 3/3] Replace pid_t in autofs4 with struct pid reference.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



sukadev@xxxxxxxxxx writes:

> Index: lx26-20-mm2c/fs/autofs4/waitq.c
> ===================================================================
> --- lx26-20-mm2c.orig/fs/autofs4/waitq.c 2007-02-28 14:48:35.000000000 -0800
> +++ lx26-20-mm2c/fs/autofs4/waitq.c	2007-02-28 15:47:21.000000000 -0800
> @@ -296,8 +296,8 @@ int autofs4_wait(struct autofs_sb_info *
>  		wq->ino = autofs4_get_ino(sbi);
>  		wq->uid = current->uid;
>  		wq->gid = current->gid;
> -		wq->pid = current->pid;
> -		wq->tgid = current->tgid;
> +		wq->pid = pid_nr(task_pid(current));
> +		wq->tgid = pid_nr(task_tgid(current));
>  		wq->status = -EINTR; /* Status return if interrupted */
>  		atomic_set(&wq->wait_ctr, 2);
>  		mutex_unlock(&sbi->wq_mutex);

I don't quite follow all of the waitq logic but it looks like these
values are cached in the kernel and then eventually passed to a user
space daemon. 

Which looks to me like the wait queue should have a struct pid * and
we should call pid_nr in the daemon process context.  Otherwise the
daemon might see the wrong pid values.

So I think autofs4 needs some more work.

Eric
_______________________________________________
Containers mailing list
Containers@xxxxxxxxxxxxxx
https://lists.osdl.org/mailman/listinfo/containers


[Index of Archives]     [Cgroups]     [Netdev]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux