OpenVZ Forum


Home » Mailing lists » Devel » [PATCH] vt: Rework the console spawning variables.
Re: [PATCH] vt: Rework the console spawning variables. [message #16664 is a reply to message #16650] Mon, 11 September 2006 05:01 Go to previous message
ebiederm is currently offline  ebiederm
Messages: 1354
Registered: February 2006
Senior Member
Oleg Nesterov <oleg@tv-sign.ru> writes:

> On 09/10, Eric W. Biederman wrote:
>>
>> Oleg Nesterov <oleg@tv-sign.ru> writes:
>> 
>> > On 09/10, Eric W. Biederman wrote:
>> >>
>> >> Updating this old code is painful.
>> >
>> > No, no, we shouldn't change the old code, it is fine.
>> >
>> So what happens when:
>> cpu0:                         cpu1:
>> kill_pid(vt_pid,....)  fn_SAK()->vc_reset()->put_pid(xchg(&vt_pid, NULL))
>> 
>> Can't kill_pid dereference vt_pid after put_pid is called?
>
> Ah, I didn't consider that patch as 'old code', sorry :)

What I meant was that updating code that predates SMP support is painful.
When you said everything was ok. I was confused.

> I don't understand drivers/char/vt*, but surely put_pid(xchg()) can't work.
> Again, unless we have a lock to serialize access to ->vt_pid, but in that
> case we don't need xchg().

Ok.  So we are in violent agreement then, my patch was wrong.

The xchg half works.  For taking and putting a reference it is fine, you
just can't use that reference for anything safely.

So I need to come up with a new patch that gets it's locking correct,
in the fn_SAK case.

Eric
_______________________________________________
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
Read Message
Read Message
Read Message
Previous Topic: [PATCH] file: Add locking to f_getown
Next Topic: [PATCH] usb: Fixup usb so it uses struct pid
Goto Forum:
  


Current Time: Mon Oct 13 23:35:22 GMT 2025

Total time taken to generate the page: 0.12771 seconds