OpenVZ Forum


Home » Mailing lists » Devel » [RFC][PATCH] Use struct pid reference in autofs rather than pid_t
Re: [RFC][PATCH] Use struct pid reference in autofs rather than pid_t [message #17311 is a reply to message #17310] Wed, 24 January 2007 06:55 Go to previous message
Sukadev Bhattiprolu is currently offline  Sukadev Bhattiprolu
Messages: 413
Registered: August 2006
Senior Member
Yuck. My second glance did not catch any problems :-(.

Will fix the ref count and split into two patches.

Thanks,

Suka

Eric W. Biederman [ebiederm@xmission.com] wrote:
| Sukadev Bhattiprolu <sukadev@us.ibm.com> writes:
| 
| > From: Sukadev Bhattiprolu <sukadev@us.ibm.com>
| > Subject: Use struct pid reference in autofs rather than pid_t
| >
| > Make autofs container-friendly by caching struct pid reference rather
| > than pid_t.
| 
| Are autofs and autofs4 so tightly tied they must be converted together?
| If not 2 patches are more appropriate.
| 
| Otherwise I'd say this looks fine at first glance.
| 
| Just note that using struct pid protects from pid wraparound issues when
| dealing with user space so this should also be a small increase in
| correctness as well.
| 
| At second glance this patch is very incorrect.  It is missing get_pid
| and put_pid calls.
| 
| The big difference between struct pid and pid_t values is that
| struct pid is reference counted.
| 
| Your find_pid's should be find_get_pid's and you need the put_pids
| and unmount or whenever those values stop being valid.
| 
| You also didn't take the required locks when using find_pid.
| 
| Eric
_______________________________________________
Containers mailing list
Containers@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/containers
 
Read Message
Read Message
Read Message
Previous Topic: [PATCHSET] 2.6.20-rc4-mm1-lxc4
Next Topic: + statically-initialize-struct-pid-for-swapper.patch added to -mm tree
Goto Forum:
  


Current Time: Sat Aug 10 18:52:34 GMT 2024

Total time taken to generate the page: 0.02785 seconds