OpenVZ Forum


Home » Mailing lists » Devel » [RFC][PATCH 3/6] pid namespace : use struct pid_nr
Re: [RFC][PATCH 3/6] pid namespace : use struct pid_nr [message #17780 is a reply to message #17689] Tue, 13 March 2007 08:02 Go to previous messageGo to previous message
Cedric Le Goater is currently offline  Cedric Le Goater
Messages: 443
Registered: February 2006
Senior Member
>> Index: lx26-20-mm2b/kernel/pid.c
>> ===================================================================
>> --- lx26-20-mm2b.orig/kernel/pid.c	2007-03-09 15:29:21.000000000 -0800
>> +++ lx26-20-mm2b/kernel/pid.c	2007-03-09 15:29:23.000000000 -0800
>> @@ -180,8 +180,19 @@ fastcall void put_pid(struct pid *pid)
>>  	if (!pid)
>>  		return;
>>  	if ((atomic_read(&pid->count) == 1) ||
>> -	     atomic_dec_and_test(&pid->count))
>> +	     atomic_dec_and_test(&pid->count)) {
>> +		struct pid_nr* pid_nr;
>> +		struct hlist_node *pos, *next;
>> +
>> +		/*
>> +		 * rcu is not needed anymore
>> +		 */
> 
> rcu should never be needed...
> We should be able to get away with a definition that is immutable for the
> lifetime of a struct pid.

but struct pid requires to be rcu safe and as the new struct pid_nr is a
member of struct pid, it seems that the same rule should apply. nop ? 

Cheers,

C. 
_______________________________________________
Containers mailing list
Containers@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/containers
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [PATCH] Kill unused sesssion and group values in rocket driver
Next Topic: [RFC][PATCH 6/6]: Enable unsharing pid namespace.
Goto Forum:
  


Current Time: Fri Aug 15 03:25:45 GMT 2025

Total time taken to generate the page: 0.35418 seconds