Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 260422
b: refs/heads/master
c: a64a26e
h: refs/heads/master
v: v3
  • Loading branch information
KOSAKI Motohiro authored and Linus Torvalds committed Jul 26, 2011
1 parent 8fb40ab commit c3b4df9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 37e7b5f1535dddaace865b25df34a2d049a3a66f
refs/heads/master: a64a26e822ddb739de464540dfd2cbb6abce47d5
14 changes: 14 additions & 0 deletions trunk/include/linux/cpumask.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c3b4df9

Please sign in to comment.