+ proc-dont-lock-task_structs-indefinitely-task_mmu-small-fixes.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     task_mmu small fixes

has been added to the -mm tree.  Its filename is

     proc-dont-lock-task_structs-indefinitely-task_mmu-small-fixes.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this


From: Prasanna Meda <mlp@xxxxxxxxxx>

These are the small fixes done in recent Eric W Biederman's patches.
1. Now seqfile private is separate private struct, not task struct.
2. priv->tail_vma should not be reset based on current file position,
   since once it become NULL, reseeking will not output gate vma;
   so use separate return variable tail_vma.

Signed-off-by: Prasanna Meda <mlp@xxxxxxxxxx>
Cc: Eric W. Biederman <ebiederm@xxxxxxxxxxxx>
Cc: Trond Myklebust <trond.myklebust@xxxxxxxxxx>
Cc: Paul Jackson <pj@xxxxxxx>
Cc: Oleg Nesterov <oleg@xxxxxxxxxx>
Cc: Albert Cahalan <acahalan@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 fs/proc/task_mmu.c |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff -puN fs/proc/task_mmu.c~proc-dont-lock-task_structs-indefinitely-task_mmu-small-fixes fs/proc/task_mmu.c
--- devel/fs/proc/task_mmu.c~proc-dont-lock-task_structs-indefinitely-task_mmu-small-fixes	2006-04-23 15:30:17.000000000 -0700
+++ devel-akpm/fs/proc/task_mmu.c	2006-04-23 15:30:17.000000000 -0700
@@ -124,7 +124,8 @@ struct mem_size_stats
 
 static int show_map_internal(struct seq_file *m, void *v, struct mem_size_stats *mss)
 {
-	struct task_struct *task = m->private;
+	struct proc_maps_private *priv = m->private;
+	struct task_struct *task = priv->task;
 	struct vm_area_struct *vma = v;
 	struct mm_struct *mm = vma->vm_mm;
 	struct file *file = vma->vm_file;
@@ -302,7 +303,7 @@ static void *m_start(struct seq_file *m,
 	struct proc_maps_private *priv = m->private;
 	unsigned long last_addr = m->version;
 	struct mm_struct *mm;
-	struct vm_area_struct *vma;
+	struct vm_area_struct *vma, *tail_vma = NULL;
 	loff_t l = *pos;
 
 	/* Clear the per syscall fields in priv */
@@ -327,7 +328,7 @@ static void *m_start(struct seq_file *m,
 	if (!mm)
 		return NULL;
 
-	priv->tail_vma = get_gate_vma(priv->task);
+	priv->tail_vma = tail_vma = get_gate_vma(priv->task);
 	down_read(&mm->mmap_sem);
 
 	/* Start with last addr hint */
@@ -349,17 +350,17 @@ static void *m_start(struct seq_file *m,
 	}
 
 	if (l != mm->map_count)
-		priv->tail_vma = NULL; /* After gate vma */
+		tail_vma = NULL; /* After gate vma */
 
 out:
 	if (vma)
 		return vma;
 
 	/* End of vmas has been reached */
-	m->version = (priv->tail_vma != NULL)? 0: -1UL;
+	m->version = (tail_vma != NULL)? 0: -1UL;
 	up_read(&mm->mmap_sem);
 	mmput(mm);
-	return priv->tail_vma;
+	return tail_vma;
 }
 
 static void vma_stop(struct proc_maps_private *priv, struct vm_area_struct *vma)
_

Patches currently in -mm which might be from mlp@xxxxxxxxxx are

dup-fd-error.patch
proc-dont-lock-task_structs-indefinitely-task_mmu-small-fixes.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux