aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDennis Zhou <dennisz@fb.com>2017-06-21 11:51:09 -0400
committerTejun Heo <tj@kernel.org>2017-06-21 12:00:45 -0400
commit11df02bf9bc1f6fd8416d22c08275e31f8c4f30d (patch)
tree186cdfac873dbecd6ad4a6d6b5d91d959ac51bfc
parent104b4e5139fe384431ac11c3b8a6cf4a529edf4a (diff)
percpu: resolve err may not be initialized in pcpu_alloc
From 4a42ecc735cff0015cc73c3d87edede631f4b885 Mon Sep 17 00:00:00 2001 From: Dennis Zhou <dennisz@fb.com> Date: Wed, 21 Jun 2017 08:07:15 -0700 Add error message to out of space failure for atomic allocations in percpu allocation path to fix -Wmaybe-uninitialized. Signed-off-by: Dennis Zhou <dennisz@fb.com> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Tejun Heo <tj@kernel.org>
-rw-r--r--mm/percpu.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/mm/percpu.c b/mm/percpu.c
index a5bc3634d2a9..bd4130a69bbc 100644
--- a/mm/percpu.c
+++ b/mm/percpu.c
@@ -956,8 +956,10 @@ restart:
956 * tasks to create chunks simultaneously. Serialize and create iff 956 * tasks to create chunks simultaneously. Serialize and create iff
957 * there's still no empty chunk after grabbing the mutex. 957 * there's still no empty chunk after grabbing the mutex.
958 */ 958 */
959 if (is_atomic) 959 if (is_atomic) {
960 err = "atomic alloc failed, no space left";
960 goto fail; 961 goto fail;
962 }
961 963
962 if (list_empty(&pcpu_slot[pcpu_nr_slots - 1])) { 964 if (list_empty(&pcpu_slot[pcpu_nr_slots - 1])) {
963 chunk = pcpu_create_chunk(); 965 chunk = pcpu_create_chunk();