linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: linux-kernel@vger.kernel.org
Cc: mingo@kernel.org, laijs@cn.fujitsu.com, dipankar@in.ibm.com,
	akpm@linux-foundation.org, mathieu.desnoyers@efficios.com,
	josh@joshtriplett.org, tglx@linutronix.de, peterz@infradead.org,
	rostedt@goodmis.org, dhowells@redhat.com, edumazet@google.com,
	dvhart@linux.intel.com, fweisbec@gmail.com, oleg@redhat.com,
	bobby.prani@gmail.com,
	"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Subject: [PATCH tip/core/rcu 02/14] rcu: Check the return value of zalloc_cpumask_var()
Date: Thu, 28 Aug 2014 11:38:05 -0700	[thread overview]
Message-ID: <1409251097-26734-2-git-send-email-paulmck@linux.vnet.ibm.com> (raw)
In-Reply-To: <1409251097-26734-1-git-send-email-paulmck@linux.vnet.ibm.com>

From: Pranith Kumar <bobby.prani@gmail.com>

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>
---
 kernel/rcu/tree_plugin.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
index 92127d787c42..6c097d630b06 100644
--- a/kernel/rcu/tree_plugin.h
+++ b/kernel/rcu/tree_plugin.h
@@ -2440,7 +2440,10 @@ void __init rcu_init_nohz(void)
 #endif /* #if defined(CONFIG_NO_HZ_FULL) */
 
 	if (!have_rcu_nocb_mask && need_rcu_nocb_mask) {
-		zalloc_cpumask_var(&rcu_nocb_mask, GFP_KERNEL);
+		if (!zalloc_cpumask_var(&rcu_nocb_mask, GFP_KERNEL)) {
+			pr_info("rcu_nocb_mask allocation failed, callback offloading disabled.\n");
+			return;
+		}
 		have_rcu_nocb_mask = true;
 	}
 	if (!have_rcu_nocb_mask)
-- 
1.8.1.5


  reply	other threads:[~2014-08-28 18:38 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-28 18:37 [PATCH tip/core/rcu 0/14] NOCBs and NO_HZ_FULL changes for 3.18 Paul E. McKenney
2014-08-28 18:38 ` [PATCH tip/core/rcu 01/14] rcu: Fix attempt to avoid unsolicited offloading of callbacks Paul E. McKenney
2014-08-28 18:38   ` Paul E. McKenney [this message]
2014-08-28 18:38   ` [PATCH tip/core/rcu 03/14] rcu: Use true/false for return in __call_rcu_nocb() Paul E. McKenney
2014-08-28 18:38   ` [PATCH tip/core/rcu 04/14] rcu: Use true/false for return in rcu_nocb_adopt_orphan_cbs() Paul E. McKenney
2014-08-28 18:38   ` [PATCH tip/core/rcu 05/14] rcu: Use false for return in __call_rcu_nocb() Paul E. McKenney
2014-08-28 18:38   ` [PATCH tip/core/rcu 06/14] rcu: Return false instead of 0 in rcu_nocb_adopt_orphan_cbs() Paul E. McKenney
2014-08-28 18:38   ` [PATCH tip/core/rcu 07/14] rcu: Rationalize kthread spawning Paul E. McKenney
2014-08-28 18:38   ` [PATCH tip/core/rcu 08/14] rcu: Create rcuo kthreads only for onlined CPUs Paul E. McKenney
2014-08-28 18:38   ` [PATCH tip/core/rcu 09/14] rcu: Check for have_rcu_nocb_mask instead of rcu_nocb_mask Paul E. McKenney
2014-08-28 18:38   ` [PATCH tip/core/rcu 10/14] rcu: Eliminate redundant rcu_sysidle_state variable Paul E. McKenney
2014-08-28 18:38   ` [PATCH tip/core/rcu 11/14] rcu: Don't track sysidle state if no nohz_full= CPUs Paul E. McKenney
2014-08-28 18:38   ` [PATCH tip/core/rcu 12/14] rcu: Avoid misordering in __call_rcu_nocb_enqueue() Paul E. McKenney
2014-08-28 18:38   ` [PATCH tip/core/rcu 13/14] rcu: Handle NOCB callbacks from irq-disabled idle code Paul E. McKenney
2014-08-28 18:38   ` [PATCH tip/core/rcu 14/14] rcu: Avoid misordering in nocb_leader_wait() Paul E. McKenney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1409251097-26734-2-git-send-email-paulmck@linux.vnet.ibm.com \
    --to=paulmck@linux.vnet.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=bobby.prani@gmail.com \
    --cc=dhowells@redhat.com \
    --cc=dipankar@in.ibm.com \
    --cc=dvhart@linux.intel.com \
    --cc=edumazet@google.com \
    --cc=fweisbec@gmail.com \
    --cc=josh@joshtriplett.org \
    --cc=laijs@cn.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mingo@kernel.org \
    --cc=oleg@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).