diff options
author | Pranith Kumar <bobby.prani@gmail.com> | 2014-07-25 19:02:07 -0400 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2014-09-16 13:08:00 -0400 |
commit | 949cccdbe6d286544ce3fe170298183eb7ada81c (patch) | |
tree | b8e77651ede63d277a5ce07944a762962b2a8299 /kernel/rcu | |
parent | f4579fc57cf4244057b713b1f73f4dc9f0b11e97 (diff) |
rcu: Check the return value of zalloc_cpumask_var()
This commit checks the return value of the zalloc_cpumask_var() used for
allocating cpumask for rcu_nocb_mask.
Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Tested-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Diffstat (limited to 'kernel/rcu')
-rw-r--r-- | kernel/rcu/tree_plugin.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h index 06d077ccf8d5..105b0ce3d78f 100644 --- a/kernel/rcu/tree_plugin.h +++ b/kernel/rcu/tree_plugin.h | |||
@@ -2440,7 +2440,10 @@ void __init rcu_init_nohz(void) | |||
2440 | #endif /* #if defined(CONFIG_NO_HZ_FULL) */ | 2440 | #endif /* #if defined(CONFIG_NO_HZ_FULL) */ |
2441 | 2441 | ||
2442 | if (!have_rcu_nocb_mask && need_rcu_nocb_mask) { | 2442 | if (!have_rcu_nocb_mask && need_rcu_nocb_mask) { |
2443 | zalloc_cpumask_var(&rcu_nocb_mask, GFP_KERNEL); | 2443 | if (!zalloc_cpumask_var(&rcu_nocb_mask, GFP_KERNEL)) { |
2444 | pr_info("rcu_nocb_mask allocation failed, callback offloading disabled.\n"); | ||
2445 | return; | ||
2446 | } | ||
2444 | have_rcu_nocb_mask = true; | 2447 | have_rcu_nocb_mask = true; |
2445 | } | 2448 | } |
2446 | if (!have_rcu_nocb_mask) | 2449 | if (!have_rcu_nocb_mask) |