Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp743932ybz; Wed, 15 Apr 2020 18:01:20 -0700 (PDT) X-Google-Smtp-Source: APiQypJLKEnAppiCX6hIKMXAgQ5jBsOUlTPjJZsgc+sRIgmBB0C+x682N+t3CsHVun0zC6ny3NCH X-Received: by 2002:a17:906:af59:: with SMTP id ly25mr7402810ejb.65.1586998880533; Wed, 15 Apr 2020 18:01:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586998880; cv=none; d=google.com; s=arc-20160816; b=URfpZILnaNpgMIUYYoInBegjGCySMp64i+yAfkcBIHJEud0Chw3EqGpvUbQuqZL31w WxuIsHvuBhjJWuP7HHJ0gq9CunQ7FIR/oszGWo/SivKmsQJ/FJSm4ACQI8US8AkD/eU9 Es3TBgOekQsw/Bj2ofUX0TZQUfSGLQkCUhbjQoE3c4Q5JuG6aO8dD9eTjDo2JqX78xfu y0aeeAeJ1AOsjAxM/9LsPRXVCs2kZFPGnj8ZHjvTmb1SGcQQBmu+QVtN4BoWjqJBjDbx NWWaApgYiDMAozf94zNHqOsYXrz5SQCNFz4PGa+Sb4NqjFszpdMWY4F+Kz6PsawaWxjC QHMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=HxG0r7hAOihPQolhiAxiSpbfJApEZjUojCdyDxEKaME=; b=cyWWtmVgUw26R6HMPkSkjHYPicPyMEjoLFU5M+y85CdE8FEpPJslWOtJTg4fgm7fOB hYZKs5fCKKmonwrrlM3/0l5QzVKT291+RndEUZ8I/GTHrjju5P/yw5ZbMopP73JXFdYu 9ywlSwhIFUDDBwRwU/S4b/YyyXBEg5UfNZKrO8PidZ+hIq+9mdNNdjpoWxWHhmbhsCYH cCkTQahBh1K5aZHubaxSHx5Bm1AGhID6/QAnuBKhmmgmY9pv8VUx3YsYZ6gdztDPyZnU K5wsVROuBIQFOOuhRJ0Tf4WLKL4XnAASwRnK4825eYJUucTjS80zwbLAVxWe+UnGpw4g WFXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=WhOW0LP0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i8si10049674ejf.197.2020.04.15.18.00.57; Wed, 15 Apr 2020 18:01:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=WhOW0LP0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2441671AbgDOTNk (ORCPT + 99 others); Wed, 15 Apr 2020 15:13:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51286 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1416868AbgDOSuW (ORCPT ); Wed, 15 Apr 2020 14:50:22 -0400 Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 12520C061A0C for ; Wed, 15 Apr 2020 11:50:20 -0700 (PDT) Received: by mail-wm1-x341.google.com with SMTP id d77so836255wmd.3 for ; Wed, 15 Apr 2020 11:50:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=HxG0r7hAOihPQolhiAxiSpbfJApEZjUojCdyDxEKaME=; b=WhOW0LP0WSkxBIxmIudr/kHzIGLgmxz4wfb1q2QmUH1rHOcIi1ByObTmVdUVydbvIX sbj1Ilay83nb8NWkB0KHCAAITGOThoT6pTS1JS3BGOOONMu5KOI0klloxRsZK3U4B1k8 u03ho6QlmEranl40DzWLacHt3b06UwzuQ0nef5K/HrIrcyVcRw/E37eAIgwXg/nsPKZ3 12AuvCeyh3QMIuXfs+ivUK0WvMIo1gzB1gA4l7ujyTtgsDppAcu54tGMSol/O75UeAmY 0uuHuNkgxXJUCQKWjRtYZ52KiH+iKm6Z/UyDdgO0/imK82/UxcxxNYpwYeC/msJ1Ls1D CCQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=HxG0r7hAOihPQolhiAxiSpbfJApEZjUojCdyDxEKaME=; b=CU3ri2vuEui5Nzg1GrtfeLnBQR+eZuU7GxxBeQQZY7O3pkUoF7N47sXtkjEDU8KTbM rZchhTjBzM/4/uwAO0ZcZk2aOTMqNiA41ZebvQTXx8OmGsM4Pi1W4TeQZGaz2cQnHWUf 1P3guIX+r8QDdTd3Xo6BTJvHg6Mm8T6idfX1wdZkhY+B/gvbnZbr8ukF9TZiIzRSsQ8O YM/FWOfbWpic5/nTnEaWxk01C4aAoSiT4RTLKWNFkI13ogekvfgl43NX2hrW9cFvKyt/ wpFB/XzldMulXSXSW9lj9WEcpW5lL8IaYEz2TmnMHPwfkQ3kyRN8NtAtEHFNK7r5CYnz WDyg== X-Gm-Message-State: AGi0PuaUXuT55+y/Y1aZ4Vyzk40yjPz/9MBnrrkmBEyUUYNwwEAwZD+B dRd68Ph5gUt90y/pxaqcSq3bAy+QuqhW X-Received: by 2002:a1c:9ecb:: with SMTP id h194mr671829wme.49.1586976615589; Wed, 15 Apr 2020 11:50:15 -0700 (PDT) Received: from ninjahost.lan (79-73-33-244.dynamic.dsl.as9105.com. [79.73.33.244]) by smtp.gmail.com with ESMTPSA id w7sm24757618wrr.60.2020.04.15.11.50.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Apr 2020 11:50:15 -0700 (PDT) From: Jules Irenge To: linux-kernel@vger.kernel.org Cc: boqun.feng@gmail.com, Thomas Gleixner , Jiri Kosina , Peter Zijlstra , Josh Poimboeuf , Ingo Molnar , Qian Cai , Eiichi Tsukata , Pavankumar Kondeti , Arnd Bergmann , Tyler Hicks Subject: [PATCH 1/1] cpu: Add annotation inside clear_tasks_mm_cpumask() Date: Wed, 15 Apr 2020 19:49:37 +0100 Message-Id: <20200415184937.32373-2-jbi.octave@gmail.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200415184937.32373-1-jbi.octave@gmail.com> References: <20200415184937.32373-1-jbi.octave@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Sparse reports a warning warning: context imbalance in clear_tasks_mm_cpumask() - different lock contexts for basic block The root cause is the missing annotation inside clear_tasks_mm_cpumask() Add the missing __acquire(&t->alloc_lock) annotation. Signed-off-by: Jules Irenge --- kernel/cpu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/cpu.c b/kernel/cpu.c index 9c706af713fb..d8c452a8dd09 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c @@ -834,6 +834,7 @@ void clear_tasks_mm_cpumask(int cpu) t = find_lock_task_mm(p); if (!t) continue; + __acquire(&t->alloc_lock); cpumask_clear_cpu(cpu, mm_cpumask(t->mm)); task_unlock(t); } -- 2.24.1