Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp2167801ybv; Fri, 14 Feb 2020 12:51:35 -0800 (PST) X-Google-Smtp-Source: APXvYqyChSXTWPMHDRtorSdOBJwBLt720d+ghUIWfnHUlzzUsuYqWV6zRR+suM/ScoHr9aytMH81 X-Received: by 2002:aca:1c09:: with SMTP id c9mr3222186oic.85.1581713495215; Fri, 14 Feb 2020 12:51:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581713495; cv=none; d=google.com; s=arc-20160816; b=hBRRiwc8CrqUMwkUKcJPJ1BkTyaxaMpDr5qKc7HSb7WYYRtko2NFl0TGbz+Nf670M8 yRIZRHCGa8K9DFHn4HukCD0AJsE3pndE1RHA4msVNTGJ9axbb+xL4EYnuB/hbhn8WqYs ky35pYlE+8n3vQC/2qVkwgaBMexZwaCYP2HZxu78gX4wIst5KbrDI6R+0tqLbxOGqPMJ llJMwg2V5Ll86Kt2LmWY3+9xeXrxQwh3s0dGQiFlZfRPfxBAuC3kNupaHdG74jLlFe/n pKqmPbpC/2VuDlW23RaYNbmcnBaLQZG9xUo25kvvtSlHw+uGfVdb7h5IMji2YgGWKV+y X82Q== 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=qqlwSy6JMgxnPSfhZV4GwX+hZPQbfgP4zcGS/hUO46k=; b=y4VbqUydP5q/dis6wocgAg+0ouiUkIGmGFVTDqR2PU458fUicjGyKK/xz8FsXnpJFS JpxuDo0Qj/2SJFOFd/dPZ98yed3Qs050gb+Ewz9Hq/w8T8A/bedPYrnB/1xi+p2S92mY nNj8A4NGwz9XntGR84RLhnek7i6/F9+GeFNVwlWX9J5zzbyftLKsC3z4++IOPnVMyGTm ShoPQY3SyV3LoeRPYWKGJlgfiTrl9n8Dts79BtdXpOYVCB6tA1FzfeyUZD5JslBg4pIZ ss3/XT0FVQn+Gb6+0ygYhevArKr3uSIPDLZIxJNGiDHeOnARSpiKvn4Z2tnne8Oa09gN Jw2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=rK1u9MXu; 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 l28si2104495otd.276.2020.02.14.12.51.23; Fri, 14 Feb 2020 12:51:35 -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=rK1u9MXu; 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 S2388541AbgBNUsz (ORCPT + 99 others); Fri, 14 Feb 2020 15:48:55 -0500 Received: from mail-wr1-f67.google.com ([209.85.221.67]:47085 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388212AbgBNUst (ORCPT ); Fri, 14 Feb 2020 15:48:49 -0500 Received: by mail-wr1-f67.google.com with SMTP id z7so12449165wrl.13 for ; Fri, 14 Feb 2020 12:48:48 -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=qqlwSy6JMgxnPSfhZV4GwX+hZPQbfgP4zcGS/hUO46k=; b=rK1u9MXuCcnFGL388qiEoUa8Jg+ToyIFWPYrxRIOpPzoRoDCk2NB2PjmION6rddk7T yIvAkdaQAUvyk5hw6ErIyf0wn1O8vJS/bNL0AcwP2zwzVUTdLr3R/9IdP1HfpchRhZQQ wm326/cNnSZfNleMu4Ju4ykSGtudK1Z9vLr+diS5RlU+XTiPZux6WvjZxPTTPVEkwaTi dVY1xukw7YnJARIPM228FIFB46bObW63W54wEVXouKJ3GjlLXLPEQn9eu+lBDRcE4nX3 sbwmcWUe+lJQwPYJkZCX7n8RfZiOZF4uNmmdcjRqNk4vSVs2m2qiz3/3Pr+/98c3BM9d JjKw== 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=qqlwSy6JMgxnPSfhZV4GwX+hZPQbfgP4zcGS/hUO46k=; b=bLij0zL6f/qGiU090N+732ccBuHVs6oxmY/q63TTEGeZD9mJYriod29+y2c5K5CWvG lPGOCEgdqifTIfb+RpocB2BLuxDwMgc1LrgprJJ5BZzpRgDrChTZdTMCs9vl4wK+FnCd XL1PopFIh/sEFtg811il2hv2robHffH51SVk5O1Li7Z8ORLG5tIX4Knr3NLFlBZwJIOw D4u3rovgbIL/V4y4Ug3oKCb5rRbr0DOHWSMufyvpYkmC6h+NotEuSCnlpXp/ugeU0rY+ xEvM+JiJhbHC2OCB7+8y8WcHkARAzHdfpxp95vdzoQvx2+KWV1ZPti91dM4I702tbZLv +Gyg== X-Gm-Message-State: APjAAAVW1/VZtHOzfvUAVlx3l7rJasdN/sDbvZHsxloqwaMUhNtfgOWo ZCTH7QQ4oOYHgNwD9v0qpdgraqEDiT/B X-Received: by 2002:adf:f103:: with SMTP id r3mr5806487wro.295.1581713327415; Fri, 14 Feb 2020 12:48:47 -0800 (PST) Received: from ninjahost.lan (host-2-102-13-223.as13285.net. [2.102.13.223]) by smtp.googlemail.com with ESMTPSA id y12sm8660782wmj.6.2020.02.14.12.48.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Feb 2020 12:48:47 -0800 (PST) From: Jules Irenge To: linux-kernel@vger.kernel.org Cc: boqun.feng@gmail.com, Jules Irenge , Minchan Kim , Nitin Gupta , Sergey Senozhatsky , Andrew Morton , linux-mm@kvack.org (open list:ZSMALLOC COMPRESSED SLAB MEMORY ALLOCATOR) Subject: [PATCH 12/30] mm/zsmalloc: Add missing annotation for pin_tag() Date: Fri, 14 Feb 2020 20:47:23 +0000 Message-Id: <20200214204741.94112-13-jbi.octave@gmail.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200214204741.94112-1-jbi.octave@gmail.com> References: <0/30> <20200214204741.94112-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 pin_tag()() warning: context imbalance in pin_tag() - wrong count at exit The root cause is the missing annotation at pin_tag() Add the missing __acquires(bitlock) annotation Signed-off-by: Jules Irenge --- mm/zsmalloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c index 2eab424c8c67..7bac76ae11b3 100644 --- a/mm/zsmalloc.c +++ b/mm/zsmalloc.c @@ -891,7 +891,7 @@ static inline int trypin_tag(unsigned long handle) return bit_spin_trylock(HANDLE_PIN_BIT, (unsigned long *)handle); } -static void pin_tag(unsigned long handle) +static void pin_tag(unsigned long handle) __acquires(bitlock) { bit_spin_lock(HANDLE_PIN_BIT, (unsigned long *)handle); } -- 2.24.1