Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1188100ybl; Fri, 31 Jan 2020 16:07:26 -0800 (PST) X-Google-Smtp-Source: APXvYqxo63oGWljCEChHyGGYRbA4yTf1VBLyOQxkGaUrR4YdQ+qHgXharE0Prn1KvV5I25zRZB+3 X-Received: by 2002:a9d:1928:: with SMTP id j40mr9696867ota.68.1580515645905; Fri, 31 Jan 2020 16:07:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580515645; cv=none; d=google.com; s=arc-20160816; b=wM7ozLRTVZMqSw7pAF87CHQPQxUMb4L26GTSvCQi+8e1MKZekAYQ8y+i6n+p+GEtno GBCaY0BmEHMJ2JnIXZVPId6VDv1e22CvuGToZ/nnDQJE9sF05CnHtQ8KQweTj9OvdfHh ZO8OnkxZnGR6DorfzGahL17mWK1ZYXhA6YC9R8biM0mzk0RbyT30LpgRdcBvUZcEyXk2 w4NlcdA7+l3E2uyVeZevrbeNqYLCdgssp1LbXgCyBsIWTqIJyldit4KbatcHd6smhh0f AT5Sc9cTibT40dnNrLvyOL3YkxyBC7wa3bKGXC7MeGVeiu1XCnVAzFVKiZZNkaGvBec3 qufA== 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=wJlzkK5+0PNv3/1riCcFIzlrQW5zvJDlKg5mXh7DPjF/kKcTupmJ8jJkCM5l5OpnFe 5zSfuhAbGuP8gq5TZKNcKk6V3PfOzdosCiyUD5McEZjrY6eMf30Wx6+lrBY/W9Epj0yR PN3aoRwuNNBWEpOHtIvtCtvV99IucY21qQLpYA7//LOWM0IMgKd20lz+826bYsTa3xmj Oi6GcN9XRgdMQw1Bg3ClQjY224mx+grCoJbALwXcoYcNQhBUEDASe/3h25H6aqJBddWm Iz/EgNbz6ZxOZhlHnJP3GBwW83mWe0rtXj3fQ2pLQnytHiSn5qUvoadUHbllaWUqSiAi 0PLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=pHXcl61o; 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 q26si5122508oij.38.2020.01.31.16.07.09; Fri, 31 Jan 2020 16:07:25 -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=pHXcl61o; 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 S1727077AbgBAAEt (ORCPT + 99 others); Fri, 31 Jan 2020 19:04:49 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:34742 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726718AbgBAAEs (ORCPT ); Fri, 31 Jan 2020 19:04:48 -0500 Received: by mail-wr1-f65.google.com with SMTP id t2so10670622wrr.1 for ; Fri, 31 Jan 2020 16:04:47 -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=pHXcl61oWq7Slj1voBT1khcXEP3B1GVaiTF4lOBFsMSI19tvut3+mIkS+Lx9QVtA+0 Omase25Rh4eqqNPYi+KAS2eiiF1aOwuLB7wWrGEftkOpNbdnQAnRt2Uo9mGGKnWkNWvz nvTY6eJUX5Wf64WpGMziVkju/IYdOwF/DBWuFNXhtuyEXwUfF5v57I2oU8fMhvdjbPQD MR8wKLBlvARwdFpBZ816xXmECGzfl8bXe6giKZq+4LADTSb7y49rwEfOhe7DaJ9LS5Ho k5A6vzawPL+YaM35GT8qPG6paZCcwjskWe8DVjlct2p7if/+453uz9y133KFgQGpxqxu +OzA== 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=FS7zuTFydfjBCEmYnRkbsKZpvcen4+ms7q2QKyvQW1C7te8Q5klOsQeMXn3LbYUu3w S6FWT1vINHgu0gbnMSReYLeIa40RanBtqR3GyCiUkgzsYSpc2Y1mKsdVaC0aigRvn/re qvjEw57V5aA6XKUi5igsrF+nGTNn02FndiUU/oXk9aprSuT09NklHZvrnuNj/Pc+1uSj HDfoJYhAb7gLdVxfTx/QB9HCJslLsJ7ByaagymnFY3khUt/2Pt0fGWKXagt2MxEne/wD nweWAb4HEnjnaz+ZaXACgQ1wq7RcJs4nYiYMvPUXeBblI+iSezyyOMBQVLIPR2IbBmdF 3DFg== X-Gm-Message-State: APjAAAXMfLwjeEkjozO3hkf9Esn5rFz3knhH8Dty+Ar6kLYwR5wYPrTA vAYPC+ZmvbMwDbHf4yTkTw== X-Received: by 2002:adf:ec41:: with SMTP id w1mr849724wrn.212.1580515486276; Fri, 31 Jan 2020 16:04:46 -0800 (PST) Received: from ninjahost.lan (host-2-102-13-223.as13285.net. [2.102.13.223]) by smtp.googlemail.com with ESMTPSA id n10sm13694048wrt.14.2020.01.31.16.04.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Jan 2020 16:04:45 -0800 (PST) From: Jules Irenge To: boqun.feng@gmail.com Cc: linux-kernel@vger.kernel.org, tglx@linutronix.de, dvhart@infradead.org, peterz@infradead.org, mingo@redhat.com, Jules Irenge Subject: [PATCH 2/3] futex: Add missing annotation for wake_futex_pi() Date: Sat, 1 Feb 2020 00:04:15 +0000 Message-Id: <20200201000416.91900-3-jbi.octave@gmail.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200201000416.91900-1-jbi.octave@gmail.com> References: <0/3> <20200201000416.91900-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 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