Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1784326ybv; Sun, 23 Feb 2020 15:19:42 -0800 (PST) X-Google-Smtp-Source: APXvYqwmdGQ3ZbUQpURYxXbM33hasvcg35UYGtmhzXl2auXUHxbT6rbPGcvXwcFYJzxsZb/+pMt/ X-Received: by 2002:a9d:6005:: with SMTP id h5mr39761907otj.153.1582499982122; Sun, 23 Feb 2020 15:19:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582499982; cv=none; d=google.com; s=arc-20160816; b=u7rA/DNj2PpN9GMYcG0DxfrcStKUuPLBf+QR0pFE1Kwazp358qhK6jjjy6bKaDb4nl +ICvlXf16c9wwzA9UM9RqQBGJ2fgpmnHtVIH8971f4t6q0e1jtuMCApki7Ad77X6Mlq7 uGzJgoxQcYI9EJlJuvuJ5oipgiMUjj5OtDnrAi97GiiAMToa0bbVzd4Y2wOGpuVeocbX 495khLIEBBMh9r0ltujYATegLXbnd5ee/tTsMZxGSbsWxssmm8E2Fxvg3YcYoFISM1fk 2hORYIisuWaAITu+B56RR4GAo9/zUzqgXk+jZ58gN4cQfkk3V2me/fZx+bkr6Bh8kpsv Lx2w== 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=kaCoWQQpn+j8uvyw/vMo9mENl0qa9cM1FVrK9Szu/ak=; b=fq5IubcBGw/gUWSopGvhV6bS4X5p8UCUDwsK5Z6Q0o313SnfxV3wbmHV2TekZrkIFb 9DnVUfrS595WRj2JgTSV54P/ytm/ezAp2bRZUG9/u6egAXWzvN9YUzEX+XrK/fAq1OEb 7nFxkBdYmGQPv7G64g4o8mJmEipI4eMrnpm2L0BKY5BsqFnhGCzY1j7Yih2Eyza5okvu kOE/DNsa5v6Hljp5LcyJXsatHPQqAJAHRRzAH4MdyWesajyzINiNQpseKSoffORq3Pwg OxPKzvAPooUWG3rOggHsMe1Oeh350gIKykSbj5HHm5pPwbqJcps5CcqvtSo5y5XZ2nm4 2F9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Inl8ZX2e; 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 w12si5353873otk.77.2020.02.23.15.19.30; Sun, 23 Feb 2020 15:19:42 -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=Inl8ZX2e; 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 S1727709AbgBWXSX (ORCPT + 99 others); Sun, 23 Feb 2020 18:18:23 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:41873 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727394AbgBWXSU (ORCPT ); Sun, 23 Feb 2020 18:18:20 -0500 Received: by mail-wr1-f66.google.com with SMTP id c9so8237478wrw.8 for ; Sun, 23 Feb 2020 15:18:19 -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=kaCoWQQpn+j8uvyw/vMo9mENl0qa9cM1FVrK9Szu/ak=; b=Inl8ZX2efCpl7XykDudwdLzRAkPHwpBAP9HwzNvbyVid8ien2HR5e1oaE1p4rqeRdN Ynz6W1yd+IPHshnCWe7Q50DiM4PojZ/yPaJJmz9Cn7ioupC9BdgF76X0TWwf7bYTxlh1 BH0Q2uAxGM5HThpQ6qiOOI64RgHbSh2+nxDssDHXkPeJ9CgnhBEIJbqoGc6QpHCBerhD 0UpsQe6owWz7Q0cOi4eYAzZ3Ql5HaV+uMtbbYWbvqNEPnizsOECdveDl3bQZZkmDHsJq Iqo865UwApuiAr5s9Eu1AwoTJDjCy8m/bjwhS88K3430nZrzwuji31FibCqM38a2/pwR lF3w== 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=kaCoWQQpn+j8uvyw/vMo9mENl0qa9cM1FVrK9Szu/ak=; b=mT8VlnODqpTCaCxAGDeJ0GjoFAlFbmiXxtnk841r+KZmcfkOTv+IOAzrTIupmqoGaN MPLB806BM9AoNRoIp/VYICSBDPYiRvkHX5PJxN/oxyjL8s9BcNLhI/vg4jaisiG9KhJg DkaTPH+v/4megG2zPmfmn84hiAzX2ZorXwei1DZzncC93o8gx6e3eKQSUYwjTin9mDPF rY0wRPcq9c3VOliHIhEeyI2wJWrLe7BKqqHoD36fQtXoFxkGv7Up3EW5utNEWOX8TZKg VHG0bscCIENWcKmPlX+GK1l1JRjA93bFaL8ffRTTkLcVEpqxEN8E8gpzbK9QVjoDr4ex ldMw== X-Gm-Message-State: APjAAAXQ7RxEq1fxcxYipu41miTOx6ktQb4lP/FDNn1FTfoGixVNTdI4 oiv9p7Xr0mVEy42HbZEkT8V+L+WpUo+u X-Received: by 2002:adf:f9cb:: with SMTP id w11mr9021833wrr.383.1582499898333; Sun, 23 Feb 2020 15:18:18 -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.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Feb 2020 15:18:17 -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 20/30] mm/zsmalloc: Add missing annotation for migrate_write_unlock() Date: Sun, 23 Feb 2020 23:17:01 +0000 Message-Id: <20200223231711.157699-21-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 migrate_write_unlock() warning: context imbalance in migrate_write_unlock() - unexpected unlock The root cause is the missing annotation at migrate_write_unlock() Add the missing __releases(&zspage->lock) 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 7ec69a1140cf..cb5541d06823 100644 --- a/mm/zsmalloc.c +++ b/mm/zsmalloc.c @@ -1852,6 +1852,7 @@ static void migrate_write_lock(struct zspage *zspage) } static void migrate_write_unlock(struct zspage *zspage) + __releases(&zspage->lock) { write_unlock(&zspage->lock); } -- 2.24.1