All of lore.kernel.org
 help / color / mirror / Atom feed
* [merged] cpumask-add-cpumask_var_t-documentation.patch removed from -mm tree
@ 2011-07-27 19:28 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2011-07-27 19:28 UTC (permalink / raw)
  To: kosaki.motohiro, tfransosi, mm-commits


The patch titled
     cpumask: add cpumask_var_t documentation
has been removed from the -mm tree.  Its filename was
     cpumask-add-cpumask_var_t-documentation.patch

This patch was dropped because it was merged into mainline or a subsystem tree

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: cpumask: add cpumask_var_t documentation
From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>

cpumask_var_t has one notable difference from cpumask_t.  Add the
explanation.

Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 include/linux/cpumask.h |   14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff -puN include/linux/cpumask.h~cpumask-add-cpumask_var_t-documentation include/linux/cpumask.h
--- a/include/linux/cpumask.h~cpumask-add-cpumask_var_t-documentation
+++ a/include/linux/cpumask.h
@@ -617,6 +617,20 @@ static inline size_t cpumask_size(void)
  *	  ... use 'tmpmask' like a normal struct cpumask * ...
  *
  *	free_cpumask_var(tmpmask);
+ *
+ *
+ * However, one notable exception is there. alloc_cpumask_var() allocates
+ * only nr_cpumask_bits bits (in the other hand, real cpumask_t always has
+ * NR_CPUS bits). Therefore you don't have to dereference cpumask_var_t.
+ *
+ *	cpumask_var_t tmpmask;
+ *	if (!alloc_cpumask_var(&tmpmask, GFP_KERNEL))
+ *		return -ENOMEM;
+ *
+ *	var = *tmpmask;
+ *
+ * This code makes NR_CPUS length memcopy and brings to a memory corruption.
+ * cpumask_copy() provide safe copy functionality.
  */
 #ifdef CONFIG_CPUMASK_OFFSTACK
 typedef struct cpumask *cpumask_var_t;
_

Patches currently in -mm which might be from kosaki.motohiro@jp.fujitsu.com are

origin.patch
linux-next.patch
slab-use-numa_no_node.patch
kexec-remove-kmsg_dump_kexec.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-07-27 19:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-27 19:28 [merged] cpumask-add-cpumask_var_t-documentation.patch removed from -mm tree akpm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.