OpenVZ Forum


Home » Mailing lists » Devel » [PATCH 0/12] Schedule find_task_by_pid() for removal
Re: [PATCH 12/12] Deprecate the find_task_by_pid [message #26826 is a reply to message #26615] Fri, 01 February 2008 22:27 Go to previous message
akpm is currently offline  akpm
Messages: 224
Registered: March 2007
Senior Member
On Tue, 29 Jan 2008 17:09:55 +0300
Pavel Emelyanov <xemul@openvz.org> wrote:

> diff --git a/kernel/kgdb.c b/kernel/kgdb.c
> index 87b0463..6de0fd0 100644
> --- a/kernel/kgdb.c
> +++ b/kernel/kgdb.c
> @@ -621,7 +621,7 @@ static struct task_struct *getthread(struct pt_regs *regs, int tid)
>  	if (!tid)
>  		return NULL;
>  
> -	return find_task_by_pid(tid);
> +	return find_task_by_pid_ns(tid, &init_pid_ns);
>  }
>  
>  #ifdef CONFIG_SMP

The code I currently have here has changed.  Is has grown a nice comment:

	/*
	 * find_task_by_pid() does not take the tasklist lock anymore
	 * but is nicely RCU locked - hence is a pretty resilient
	 * thing to use:
	 */
	return find_task_by_pid(tid);

I updated the comment appropriately
(s/find_task_by_pid/find_task_by_pid_ns/).  Please check that this was
true.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [RFC] Default child of a cgroup
Next Topic: [PATCH] fix spurious EBUSY on memory cgroup removal
Goto Forum:
  


Current Time: Fri Aug 15 01:36:40 GMT 2025

Total time taken to generate the page: 0.32004 seconds