Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp3064347ybv; Sun, 9 Feb 2020 14:30:02 -0800 (PST) X-Google-Smtp-Source: APXvYqxNiMN75Kx9Ys3pdxg5FCC80yquNYfMjbCaJiK3nL5wDjTTRPx4A+jJouTlYxLwj2rcLV2R X-Received: by 2002:a9d:2184:: with SMTP id s4mr7658081otb.121.1581287402841; Sun, 09 Feb 2020 14:30:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581287402; cv=none; d=google.com; s=arc-20160816; b=l4Rs9fP7U4iFiBwPQUCThiaGybhrJ0Xv9CsoWk6nTRxGFsrIz4oKloMWq7hTJsmSOk ZebdVP2i0VsaGV0AkIPYa0q4XsuVOl5FeBoWwU3VqAl4SlcJtlt5hCu9UVF7hvN5OjJn lZ3iMLBzM/Zfui6Jm6koPqw4SeGnWNnEHmdPJqb3yUbEHk4hEbKtPXtRnVh98PTscLaa 1HIPjSevCqHRmaBZyb3jUmxC8z6xJT+m0VEp+GbXOS3kYYuQrXJlctSRoTfKR5U/+Grh c0FMy/YfMcQyCvaPipBA46raHvj7/vEWI/zGzbu/GzMTb+qMk5NBOQTqCf0Cr6sV9kp+ Vsag== 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=uimvgFyuSg7nYK2tM2GQSI3r7Vr6x3Dc1/TzlyQxk6c=; b=tsyWhdc+JnF9mUmVGRX+37+w42LZaRWAK9IJ2nhF0tjtJj/QRmEgEZN37UTpzpV5aw GTgCqqkT7r3x9YAys3dabqVbfptknYm71lN9UawxhIGJ1Z9Wm+Z9fRLdhxovWekEVz0u 0rt+3vTLV8jiAUuXGVgfiNQ6Ol9WwRHtmKhxbVDWSSYBx+K9sLiz0knY6F+daqU8CmFJ bt9sLpzeStJlsxR9YSY1R/HzSFwQ61rDHOcURpRICuWwGWeMPZdgXzc8e3U69Vy2Y6Gy /g4hzRo2WJnTunZB+lOpxG3QeXS+ighnRdhZQJMJ6gDDtTGoa/MN2NgzE9mYejRuKOyD aryg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=VGCjK6Rd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id q131si7148171oig.203.2020.02.09.14.29.50; Sun, 09 Feb 2020 14:30:02 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=VGCjK6Rd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1726910AbgBIW3l (ORCPT + 99 others); Sun, 9 Feb 2020 17:29:41 -0500 Received: from mail-wm1-f67.google.com ([209.85.128.67]:54412 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726658AbgBIW3l (ORCPT ); Sun, 9 Feb 2020 17:29:41 -0500 Received: by mail-wm1-f67.google.com with SMTP id g1so7815727wmh.4 for ; Sun, 09 Feb 2020 14:29:38 -0800 (PST) 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=uimvgFyuSg7nYK2tM2GQSI3r7Vr6x3Dc1/TzlyQxk6c=; b=VGCjK6Rd+fMIeQrRLtwiauOXBlFUwapuwF99BlUPE5Art9v4hqkoAgMSVC8e8hFCcx EgsKWEBA8JgsVB+fG6PgMWMicrm7G0y1XSsvsWHaPZyeg+snEu63+T4zbiAB/Jc6Kwr2 StVx+mN2xT9+kyptSRJHzp6ttR9TudQcbgBzaRysEYTve/oePo+kHBRMOTgzRukeriqs /8nGMdQylwbI5x6ioMs+E/CmeLCW3VE7fuEk4JuHCxL8lfcr/AJ2CyfHm+xreKXI6tXm o5sG41ZvtVNe8qd5VPZAB4JJPPpmidco1CfK5Qs1Pz/gPHbIh201VAdoOidEbi1a62nc Av5w== 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=uimvgFyuSg7nYK2tM2GQSI3r7Vr6x3Dc1/TzlyQxk6c=; b=fJjDFjOd7UZYauvWEbkHtHqmEgU96D8mVU0Apm3GyiJlf8JBS/U3pqY0nr4dr3f74X F7rLgj9sl2jqqo4RoQcg+uoWOUPk1mF4spOlydOshGZPf/MhJ/3/l5QJN0itUBu11/Tv IbN2K5pcuvnfUHWe2zkVcAEyE+I4JFgtayW3sVYxMa/ZMfoBzVfNQiLuqrnjsw9qGg+S +gz0+7LhpLPVpRHKxawQupUxUFux3HbvbaxdJ/zrUPvm23xFNNxIDWc/fES1dNsL9QHL d8SN6wTeZk9Maee2OLH99rteZRMYT/Vgwk8yWBFpuui35Wro/cD5u8GbcX8dlHpp/eVm o9Iw== X-Gm-Message-State: APjAAAUJcKD5WavJuNihjCQlIK5XmBGSOD9Kpr/poIOnvsWJJYFfmwP2 6T8d/jUVTw/GwV0WW/QYEMDWAaWMTuCY X-Received: by 2002:a1c:a796:: with SMTP id q144mr11572501wme.6.1581287377633; Sun, 09 Feb 2020 14:29:37 -0800 (PST) Received: from ninjahost.lan (host-2-102-13-223.as13285.net. [2.102.13.223]) by smtp.googlemail.com with ESMTPSA id k13sm13448590wrx.59.2020.02.09.14.29.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Feb 2020 14:29:37 -0800 (PST) From: Jules Irenge To: boqun.feng@gmail.com Cc: dvhart@infradead.org, peterz@infradead.org, mingo@redhat.com, tglx@linutronix.de, linux-kernel@vger.kernel.org, Jules Irenge Subject: [PATCH 02/11] futex: Add missing annotation for wake_futex_pi() Date: Sun, 9 Feb 2020 22:29:25 +0000 Message-Id: <0cfbbe1031005c37bf478c5a59d33cc83ef9a4a6.1581282103.git.jbi.octave@gmail.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: References: <0/11> 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 at wake_futex_pi() warning: context imbalance in wake_futex_pi() - unexpected unlock The root cause is amissing annotation of wake_futex_pi(). Add the missing __releases(&pi_state->pi_mutex.wait_lock) annotation Signed-off-by: Jules Irenge --- kernel/futex.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/futex.c b/kernel/futex.c index 0cf84c8664f2..93e7510a5b36 100644 --- a/kernel/futex.c +++ b/kernel/futex.c @@ -1550,6 +1550,7 @@ static void mark_wake_futex(struct wake_q_head *wake_q, struct futex_q *q) * Caller must hold a reference on @pi_state. */ static int wake_futex_pi(u32 __user *uaddr, u32 uval, struct futex_pi_state *pi_state) + __releases(&pi_state->pi_mutex.wait_lock) { u32 uninitialized_var(curval), newval; struct task_struct *new_owner; -- 2.24.1