Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1783837ybv; Sun, 23 Feb 2020 15:18:53 -0800 (PST) X-Google-Smtp-Source: APXvYqzT8kXrhJbJDlLJupGaxgNP/AB28xExraaVkhYBC3gucmtQXmmCShe7/nM2w9/2cPrQDM6R X-Received: by 2002:a9d:7342:: with SMTP id l2mr38334735otk.98.1582499933104; Sun, 23 Feb 2020 15:18:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582499933; cv=none; d=google.com; s=arc-20160816; b=elDvg+8v061Tn1IRldM+z22PkRt3uFNcDRrYFrg7sRcFlb5C+dEW4ebD7h1pFWR2Du KDUdA5YLFE6AkLWZ7zs8ixbQUqW44sfmbjyBUY/6qqDompurJQov9rh3fzDBIAb9ab3L F3NNKnEsISlKDr2EfQL3nyS/tBaY8JUgT5VeT4/JABhKVOXkoWIuv2KtMmGa6aAdEbE1 KkvRB5ihxfImH2yxBnjngX99HduZcTxnSlweXhiO6EhBEpPQRWJMgsdQQLagOX8Hid3Z exmlDZT66wpoTJ/BflWq8XbjlD9FvOnKlG80Aj6jFcoV8GY+145YHwGNNOZ3nbTnC3sE yXWA== 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=6tp05cGAxe3eIAI8tMjX09BksdgimN4FGWQ4p10y87E=; b=VVIXjlWO3U7jCUKyNvW2zdrt0GZofty5LlLhSlWg9elfeFqrAuXevZKWwOFubF5wQ2 /WXMZtAv3+JdJtWssdsxmqZx5cgG4Gf38B2aFSv7AzOKn9t7Evw9z6rZolHJ0rmjD/EL Gy1oznSQJSB+wInmHnXsXScwSlvd7R1zfq3LFG5lCkT6J8c+8HayhwqlYKqWSk3n4qmM 7RAqN2Flk4TWVCF2asM7MdgDccrg9z6Ca1wHjYSb9+BAQstSQyGqtHLdSHoezGkwzyXb /Q1GqkpZBq18zdRjW3mCkL5SREQgZgpea9B0FJ5RI/2N0+SixFvMkBxSmfFeLFrt7hkb Xccg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=IHcYEAyD; 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 q25si5579154otg.128.2020.02.23.15.18.41; Sun, 23 Feb 2020 15:18:53 -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=IHcYEAyD; 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 S1727686AbgBWXSV (ORCPT + 99 others); Sun, 23 Feb 2020 18:18:21 -0500 Received: from mail-wm1-f65.google.com ([209.85.128.65]:50832 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727521AbgBWXSQ (ORCPT ); Sun, 23 Feb 2020 18:18:16 -0500 Received: by mail-wm1-f65.google.com with SMTP id a5so7183499wmb.0; Sun, 23 Feb 2020 15:18:15 -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=6tp05cGAxe3eIAI8tMjX09BksdgimN4FGWQ4p10y87E=; b=IHcYEAyD7OH6N4cL0P01zGS1LY6NLpg17xhAMUoQ4l2qCBTShJSU+V+GD8NffSJ4yR 4nUyMeDByIIBzyKyaGsDY397cpdL7irHiYrtXcT8bIav5QzTbLZ21z10LtnrPhNPhzdN YgDkNRYklHfcShlp9+zlNXf1OwyoW3NiKKrF4NLRP56+3ZynTZNypVrzhDKxWOTlAMBu gBZFN+bbP+cSq4lf7ViI9IVFtM/7fl6ywIL+fgxJGILSK8hXqIcE/vmXuvYfRR74OtP3 ZucYROCXTgAw4psyntFEkwA6PDaYyuYum7csOkeZhg76TaUFLSz3AWx7t8TmAlFb/+qE PXzQ== 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=6tp05cGAxe3eIAI8tMjX09BksdgimN4FGWQ4p10y87E=; b=uDQCbRQUJLla6BWdyE6JuH66kUUIThlDkYabclQBCe7CiszVl/A18xKIhg7rjxZ0kh 6IL9y7nAFMzg2vXg9cW5fFJgqYHMXF8S637l+6kz0k441XU6s4550/eDteOjZDW72BWS 8sBaBMJ7dlH/i/pCQvGZtgR2E7ujJ75BhoOG+GJoHrhx4vSerIj6xL7rlbEuBlIMiWyx nS6sobe6atnHhOkxFxtYJGhyeMABmCb7CsNIta2Ji7EtbEDH2l7cuKCfAmmKVqHCTSoI jGNMHMsV+cP3jOFg2BwXziy7O2AiIJpFItMZCc0FLYTBdmvZlAF4PEt7+Lk5yl5VDVU2 RhZQ== X-Gm-Message-State: APjAAAWzZlaYBFfcNrUkJRtXpTQkt+s83v7w+IN+78VDUkf3nqJRMw+y 2I8AcB2fwietXPnq5dx8uw== X-Received: by 2002:a1c:2d91:: with SMTP id t139mr7703539wmt.114.1582499894164; Sun, 23 Feb 2020 15:18:14 -0800 (PST) Received: from ninjahost.lan (host-2-102-13-223.as13285.net. [2.102.13.223]) by smtp.googlemail.com with ESMTPSA id q6sm8968203wrf.67.2020.02.23.15.18.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Feb 2020 15:18:13 -0800 (PST) From: Jules Irenge To: boqun.feng@gmail.com Cc: jbi.octave@gmail.com, linux-kernel@vger.kernel.org, Alexey Dobriyan , Al Viro , Andrew Morton , David Howells , linux-fsdevel@vger.kernel.org (open list:PROC FILESYSTEM) Subject: [PATCH 16/30] proc: Add missing annotation for close_pdeo() Date: Sun, 23 Feb 2020 23:16:57 +0000 Message-Id: <20200223231711.157699-17-jbi.octave@gmail.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200223231711.157699-1-jbi.octave@gmail.com> References: <0/30> <20200223231711.157699-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 close_pdeo() warning: context imbalance in close_pdeo() - unexpected unlock The root cause is the missing annotation at close_pdeo() Add the missing __releases(&pde->pde_unload_lock) annotation Signed-off-by: Jules Irenge --- fs/proc/inode.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/proc/inode.c b/fs/proc/inode.c index 6da18316d209..1f33cb7a6c47 100644 --- a/fs/proc/inode.c +++ b/fs/proc/inode.c @@ -139,6 +139,7 @@ static void unuse_pde(struct proc_dir_entry *pde) /* pde is locked on entry, unlocked on exit */ static void close_pdeo(struct proc_dir_entry *pde, struct pde_opener *pdeo) + __releases(&pde->pde_unload_lock) { /* * close() (proc_reg_release()) can't delete an entry and proceed: -- 2.24.1