patch-2.3.38 linux/fs/proc/base.c

Next file: linux/fs/proc/omirr.c
Previous file: linux/fs/open.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.37/linux/fs/proc/base.c linux/fs/proc/base.c
@@ -643,7 +643,7 @@
 	 * grab the reference to task.
 	 */
 	inode->u.proc_i.task = task;
-	atomic_inc(&mem_map[MAP_NR(task)].count);
+	get_task_struct(task);
 	if (!task->p_pptr)
 		goto out_unlock;
 
@@ -932,7 +932,7 @@
 	read_lock(&tasklist_lock);
 	task = find_task_by_pid(pid);
 	if (task)
-		atomic_inc(&mem_map[MAP_NR(task)].count);
+		get_task_struct(task);
 	read_unlock(&tasklist_lock);
 	if (!task)
 		goto out;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)