Comment about proc-dont-lock-task_structs-indefinitely.patch

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

 



Hi,

   In reply to http://marc.theaimsgroup.com/?l=linux-kernel&m=114119848908725&q=raw
I was not following and  just noticed it.  The bug is introduced in the patch
http://www.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.16/2.6.16-mm1/broken-out/proc-dont-lock-task_structs-indefinitely.patch

The task decrement problem is fixed, but I think we have two more
problems in the following patch segment.

The priv->tail_vma should not be set NULL; In old code, the local
variable tail vma was overloaded for two more purposes as return value
and also in version calculation, in addition to beging initialised
from  gate vma. It we set the priv->tail_vma as NULL as the following
patch does, and if we seek back, we will not be able to see the gate
vma anymore from m_next.

@@ -337,35 +349,37 @@ static void *m_start(struct seq_file *m,
 	}

 	if (l != mm->map_count)
-		tail_vma = NULL; /* After gate vma */
+		priv->tail_vma = NULL; /* After gate vma */

 out:
  	if (vma)
  		return vma;

  	/* End of vmas has been reached */
-	m->version = (tail_vma != NULL)? 0: -1UL;
+	m->version = (priv->tail_vma != NULL)? 0: -1UL;
 	up_read(&mm->mmap_sem);
  	mmput(mm);
-	return tail_vma;
+	return priv->tail_vma;


Thanks,
Prasanna.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux