diff options
| author | Jeff Garzik <jgarzik@pobox.com> | 2006-01-03 10:58:53 -0500 |
|---|---|---|
| committer | Jeff Garzik <jgarzik@pobox.com> | 2006-01-03 10:58:53 -0500 |
| commit | a18ceba7b40e24a9da87249bd74f16ea5abd6894 (patch) | |
| tree | 5ce615d345e720ddabf95c46fb62287ee763ad4e /mm/mempolicy.c | |
| parent | aaadff81195056c7c14e0d834b3318c624c0fd78 (diff) | |
| parent | 88026842b0a760145aa71d69e74fbc9ec118ca44 (diff) | |
Merge branch 'master'
Diffstat (limited to 'mm/mempolicy.c')
| -rw-r--r-- | mm/mempolicy.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/mm/mempolicy.c b/mm/mempolicy.c index bec88c81244e..72f402cc9c9a 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c | |||
| @@ -161,6 +161,10 @@ static struct mempolicy *mpol_new(int mode, nodemask_t *nodes) | |||
| 161 | switch (mode) { | 161 | switch (mode) { |
| 162 | case MPOL_INTERLEAVE: | 162 | case MPOL_INTERLEAVE: |
| 163 | policy->v.nodes = *nodes; | 163 | policy->v.nodes = *nodes; |
| 164 | if (nodes_weight(*nodes) == 0) { | ||
| 165 | kmem_cache_free(policy_cache, policy); | ||
| 166 | return ERR_PTR(-EINVAL); | ||
| 167 | } | ||
| 164 | break; | 168 | break; |
| 165 | case MPOL_PREFERRED: | 169 | case MPOL_PREFERRED: |
| 166 | policy->v.preferred_node = first_node(*nodes); | 170 | policy->v.preferred_node = first_node(*nodes); |
