Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1785207ybv; Sun, 23 Feb 2020 15:20:58 -0800 (PST) X-Google-Smtp-Source: APXvYqwTd9VvhoJTpw15+QNkXjuU5v2bXaTbwNGg74ziwJBEoR20A826hhbbUxikIauhmvfcR+6r X-Received: by 2002:a05:6830:1691:: with SMTP id k17mr39035273otr.282.1582500058673; Sun, 23 Feb 2020 15:20:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582500058; cv=none; d=google.com; s=arc-20160816; b=HSDbBzUq9Oe0GlG13jZSYy3lrL6kl9P1HrV1QjEPV/Mq0EDF0YL5GQoBOJi2BuMhvS FUENoG4aL53kWOd7D5aeg+xSVOC3qY9UtTL4jVv7dokhc3/YAYNh+oX2LtkdEMmuFM72 4JkjioX8K7jfZ3217OM8g2QImaOT8+v3pCHuyXH11h5s7yPGdxakeslgnkl/zQurNbU9 MIEqD0q+Cxj+vZLPfdjnhaI3bvvbr7l2HPxZVTNG5IIXiibkkj22w+ocbz0anUEjSX1k 0WG/0XY0siDHrXnD3Or3xLxgtdtznye/mjbQ2YtwaVnmRBtpT94tljFqN7VfBIeNvRoc mtHw== 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=X1oTGA9EL4D/pEy5bBbpm6Q1m0B+MEn/I9d6coIuOhs=; b=pg73+Q159HAH8kwq6eBBEowdNua7BimRHUXVdZUQ93V6AkhK7Oc5XxjYMVQMdAavGk 5vCmb6/AVm3gZqcoqoq8ZLyAMKbb2u/XtmZf2Nq8w8CVaJnjh7vcmIrEdHUcrwSFm15z g2SUyBPLpZdZ8ZQCvnM10+wigCENfFmsAk/gvsjk7D/8RoD7aOQ1ziWRArbg7w9PlzYe wRrZKtG6/fcAwOfM8ZZFb6G2+Sifzlrxv7a94YGVFrVDxhtSglULNoQGTQtOq69F+YQO MFmbkoJgGX96MyGw3E4JiWCKur0qtg6ovOBn/D3//fGrfFv+C6BeTd8MGDZwtN3NK2Hv sYsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=OshIeKXs; 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 j25si4403387oij.242.2020.02.23.15.20.47; Sun, 23 Feb 2020 15:20:58 -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=OshIeKXs; 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 S1727584AbgBWXTO (ORCPT + 99 others); Sun, 23 Feb 2020 18:19:14 -0500 Received: from mail-wm1-f65.google.com ([209.85.128.65]:34211 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727552AbgBWXSR (ORCPT ); Sun, 23 Feb 2020 18:18:17 -0500 Received: by mail-wm1-f65.google.com with SMTP id s144so9450236wme.1 for ; 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=X1oTGA9EL4D/pEy5bBbpm6Q1m0B+MEn/I9d6coIuOhs=; b=OshIeKXsSYunnGUcKYn79kw8sa43GaDpprGqf1mIDyAzOXN4+E16wCdXFHde/BymW2 x+dhHoghAqQHU1HlJfxkQKEUpu3xQiEwo0UKqDQ3eP666zjQDi0jXkYvYCqRstKnFTL/ IPJdl0RQV0B34APWRSfCMwVhZbeFrwUVNizg/K3or8V7yARiq2w0nV4HBxILjyMVxZ5o nzpdqCRUobp41CiFrTkPYawD66/2LaokWlBf2xeql5SxF1IwNI0Lp9noW2ESOCOR7f6G TJSSJ4fdA2qFRhF+XyO/PqUstKgu7bJiTuklTiFrvWC5i7Eo4WCH32OoN1sQMzWMlfpH EsUg== 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=X1oTGA9EL4D/pEy5bBbpm6Q1m0B+MEn/I9d6coIuOhs=; b=Llv28DbpAV7mN10RXOOEvbzxMHj4HWns3//rX8dKvmgrDXohdwwXkscEumy89Sl6a1 OckdDx476SUvcm/HkmwnZ0fwZjVZ1gdxc8sxsUlAbge2FSByrS6u+L5GgRq7/MHUs0x4 ZAVkjNp5z/N9ZlyglDCkLCmcFDkKftCthH+5szC8cpSnCLfMxmqsl1GITN0/SXBFyhFi Y7pz4kkBGBcjCe3lsp3obQGGhxrpGpS+iFC1+5IvH0jwY8mj2SH8EfhC7Njazl+/VnR8 XmCRjooMO4Y/H6JzhUbfEYqW4hWsGb8aSITvcRQpGEfUp2Szm+btzWirK0XiMI/GsXAN LloA== X-Gm-Message-State: APjAAAVHeRmRkaRS0+TJczOHOOSdmCU21rqXKIztntTwcKHBdgWLW36v x0VIlaeBbTDQXlkBa9IKyAL7HzfWvc+o X-Received: by 2002:a05:600c:230d:: with SMTP id 13mr18788298wmo.13.1582499895215; Sun, 23 Feb 2020 15:18:15 -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.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Feb 2020 15:18:14 -0800 (PST) From: Jules Irenge To: boqun.feng@gmail.com Cc: jbi.octave@gmail.com, linux-kernel@vger.kernel.org, Minchan Kim , Nitin Gupta , Sergey Senozhatsky , Andrew Morton , linux-mm@kvack.org (open list:ZSMALLOC COMPRESSED SLAB MEMORY ALLOCATOR) Subject: [PATCH 17/30] mm/zsmalloc: Add missing annotation for zs_map_object() Date: Sun, 23 Feb 2020 23:16:58 +0000 Message-Id: <20200223231711.157699-18-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 zs_map_object() context imbalance in zs_map_object() - wrong count at exit The root cause is the missing annotation at zs_map_object() Add the missing __acquires(zspage) Signed-off-by: Jules Irenge --- mm/zsmalloc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c index 2aa2d524a343..9d3f9b3d22aa 100644 --- a/mm/zsmalloc.c +++ b/mm/zsmalloc.c @@ -1290,6 +1290,7 @@ EXPORT_SYMBOL_GPL(zs_get_total_pages); */ void *zs_map_object(struct zs_pool *pool, unsigned long handle, enum zs_mapmode mm) + __acquires(zspage) { struct zspage *zspage; struct page *page; -- 2.24.1