Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp3065003ybv; Sun, 9 Feb 2020 14:30:57 -0800 (PST) X-Google-Smtp-Source: APXvYqxTgkysTE1pgykA/+y+SxXXJiHV0W3Y/9WLSoYKz3XBcyWVJw1jg+sw3c7s8xzTuPh9nAvv X-Received: by 2002:a9d:5784:: with SMTP id q4mr8357619oth.278.1581287457262; Sun, 09 Feb 2020 14:30:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581287457; cv=none; d=google.com; s=arc-20160816; b=Xf7+YSMkcGiC6ClR+0d0qlrlw4tSQyEGCqJzPmn95hwaIcOnprf+cO9aaLR9VIWNoK PoHW1gPuVBOqxAShYooZaFrgbUEsfrNqyLj6ffimJz71VcupgYApnBsOeRfkpEiWRdr2 bNJ559DapPnWG1XuZarNcrLegW47XhuQeeOOGbZBnovTgH2PeI7nkJ8d3/aPDY8LFgW+ TSmxfCqFLB/NEGioPiTu2jvlPcpgAYqG+6F1RtKFaL0rYNMbxH0s0uD9aeH7PtFIQYU+ T2ENCyWDFxtr1/0exRAucV6fRLPwwq11tga3G6K2IVo/JkQFTi5RlJzTYPVbmKTvnNSf BHyQ== 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=A+cR9uVxyvC6kcqjxC2C+5dqUA2dibMuqlzRwuHl68M=; b=ptKl6y1qGOtTtKR5TqrXlUPIf1Q5n3I9kKszzMutEM9da3o+ML+DrKmyZmnft4kfSc hGx+fQuwixjU14TpXjWYjOxufXvFdpuziPycz01/VZZ9NWHNjQmL1ysTjrvNg9RrJ1qd j7shtHIM1eE0BLVIdpZVMfTZv/bbkq0FwMkP9BRYqt4EvwWn2Ykk+211eC7kdAV2vha3 At5CqkVwmvDO6t3RkU7SbjPfa6b6AvAae12pQKr7xK6bGbxXbbe339iy9cjGoSr7BdZz 5Ti2Pjae2YpfoKePM6rDI9JTCJH23ffrIZVW8Eci8DyrYWsdDrQ62IJyVEWpLJ1E9Jmd Sf8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=lPn02R7x; 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 y8si6948878oih.141.2020.02.09.14.30.44; Sun, 09 Feb 2020 14:30:57 -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=lPn02R7x; 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 S1727363AbgBIWaT (ORCPT + 99 others); Sun, 9 Feb 2020 17:30:19 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:41930 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726658AbgBIWaT (ORCPT ); Sun, 9 Feb 2020 17:30:19 -0500 Received: by mail-wr1-f66.google.com with SMTP id c9so5222805wrw.8 for ; Sun, 09 Feb 2020 14:30:18 -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=A+cR9uVxyvC6kcqjxC2C+5dqUA2dibMuqlzRwuHl68M=; b=lPn02R7xpd16ZZgB+2+rd/U5Q0igmHGWTMEjcE0aq00usl6ZSMPdS3SQ2aJL0d+4E9 kr1zWCYIAOmX3IB4UVVcLi9nDM29KCMV1kXR9jZzIXsR+oyKxXN8OwF82BvvsS6ZGdFd GLIDCLHZiYglR0aaBYI3WPhvCObTrDQrph0/mZN5ShjfsEdz/2mAXnc5lrxGkSR51Z1S luuBEyzstb0Kqoi0KBstSQK/chqoOcrEJ3/pPnLTX6MHozidFaffX5d+tqtfwxegUENz vOM9ikwavb6hKvd/yASAIBmKU2OwgCyF2s8CnfPuGyhCYzEk+lE2pDfSDuAMA9WOWzkt GOCg== 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=A+cR9uVxyvC6kcqjxC2C+5dqUA2dibMuqlzRwuHl68M=; b=SpTHqpyksPUl9irpkFyFLyU45PLV77bAmKTQCpUv4lUbggRzxslu2nRasr7yGtRnjV 6YwbBiKGU+Pb2x5bbavaDZjd3bWdHn9RA4sjcPrA5O1WZ5Rg71PcP8+IUjr94fd7n00t wBlMtqj6O0T7OHmHf05e6EN6T5uK+klaNQct56TnAHsNCyIoFx+g3i7tAJWprsSVrrUe /sKRenWu9y/qURUfH2pkXHkWO5CcNaTBEVeITZxFwX06iMsD/5S5w2OiAbuNfYSSWJ1F DQQvZY1k+7kqg11TBlaGNtQJ90W+ltbHFngFTIkLN9jRhFqh0cfu5UFfVwMGiIIURKeu cASg== X-Gm-Message-State: APjAAAUAsPVBg4iKv9qXWHHV7pdbwBQi0iLoxkkGi4jKx5rk8YQwTXPt bUKCeUTP2kbskRGqu+/e5A== X-Received: by 2002:adf:e50f:: with SMTP id j15mr11963601wrm.356.1581287417608; Sun, 09 Feb 2020 14:30:17 -0800 (PST) Received: from ninjahost.lan (host-2-102-13-223.as13285.net. [2.102.13.223]) by smtp.googlemail.com with ESMTPSA id y12sm12765716wmj.6.2020.02.09.14.30.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Feb 2020 14:30:17 -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 03/11] futex: Add missing annotation for fixup_pi_state_owner() Date: Sun, 9 Feb 2020 22:30:01 +0000 Message-Id: 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 fixup_pi_state_owner() warning: context imbalance in fixup_pi_state_owner() - unexpected unlock The root cause is a missing annotation of fixup_pi_state_owner(). Add the missing __must_hold(q->lock_ptr) 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 93e7510a5b36..5263cce46c06 100644 --- a/kernel/futex.c +++ b/kernel/futex.c @@ -2440,6 +2440,7 @@ static void unqueue_me_pi(struct futex_q *q) static int fixup_pi_state_owner(u32 __user *uaddr, struct futex_q *q, struct task_struct *argowner) + __must_hold(q->lock_ptr) { struct futex_pi_state *pi_state = q->pi_state; u32 uval, uninitialized_var(curval), newval; -- 2.24.1