Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1785117ybv; Sun, 23 Feb 2020 15:20:51 -0800 (PST) X-Google-Smtp-Source: APXvYqzliCBdWDdFiq25TovuOZSV3qlrKISALJDK9rZNyt19IGXmizbHBGrDfVCIQ/G8EpFAMOqB X-Received: by 2002:aca:b1d5:: with SMTP id a204mr10350264oif.82.1582500051654; Sun, 23 Feb 2020 15:20:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582500051; cv=none; d=google.com; s=arc-20160816; b=WMiE1j2bgEMHEU0mZZPWawUpPR5a6PBtTA6Da5FesnCZ6AlRlZ92riBHZXUojqvj3H wIETPAAOYp+nvn03aX9e2+he5Sx0pnxdjYvDlklOFGTG7fyjghxlmYIeC15sLt0rjhL5 RLiaxoMO+sIU8CTTLMd96/+IzHbH5ks8nWhBnQtZsGU569+P9UO83dSvZWdI1frAq/u5 H1y7BCWeFRNziSRyJT1Xll46CjAkb3hBdeBtvTeWPpxMr+RUshpXzHOZ7l2Bi2/osaQF GjObtlOgyjU2gWJj1oYB4cFKh04ziP0VMLPtmoLyLPM/qcW+OHPPCATm70VH9Mbjd4rM VhyQ== 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=P6aPVDykefLHu9vWbDWoJ+MolfROsTG/Ceq0Yzhn9jk=; b=gjYeELAJVTbCAN1ZtVMQhuZeNy+sy8nx6aFeA0V86faanAs5z9CU27oNy7atNUA5v4 pXA7wjvYgoZEc2jRmK2LJ0kxQS/d+pOKMLPyIoGwrrz3rPBt2jOewRTEHY84oGZcVMKq f55IKLvPHROzRRTIZTFzoTtVuLTEnwWDdh0fgyxQlykX8Desk9gt9AeY9dLaV8ownyLc EJwTAdB6Qc9rjQKvzEK+ttlHgXo4rSS8Eg49lYDME8IZjiQhWveN1tXYWMu/Ujzb52k8 D0JidliNY5KUhZJOxBq3UE60yWN+aFJOsGI+cpFiMrNWjyp6TfCQ03lT4ptNCKwbZOOd DCqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=S2gOqbm1; 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 24si4098367oiz.237.2020.02.23.15.20.40; Sun, 23 Feb 2020 15:20:51 -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=S2gOqbm1; 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 S1727960AbgBWXTP (ORCPT + 99 others); Sun, 23 Feb 2020 18:19:15 -0500 Received: from mail-wm1-f67.google.com ([209.85.128.67]:38228 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727611AbgBWXSR (ORCPT ); Sun, 23 Feb 2020 18:18:17 -0500 Received: by mail-wm1-f67.google.com with SMTP id a9so7457716wmj.3 for ; Sun, 23 Feb 2020 15:18:16 -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=P6aPVDykefLHu9vWbDWoJ+MolfROsTG/Ceq0Yzhn9jk=; b=S2gOqbm1yxGnTsrRP5C07CWiBCjIcIVeSH6rMw39UAH1Kjzl7uWufLJ+hto8NqnajQ pF4eKbgtbtaWFsZ/k+eMJB6gqwfrBZNXHd/+hwEXyFUh2gp3PcTYJVBsTyMVDe8yWN9T 0pfGrgVkVjufZubYuIV/i0sFOkGVBJ/3kPe+CllpEAFQAd9JrL8Iyg0BoT29CtRkUY0V hXgH79sNFM09rgVSC/l/wMdKTb3tNNMHZrieTCExGtw44DsIumpXNQQNvOmHE0qH4Ie7 L+liCjhMzeqHYAk9oGpCsrAbjRGTRwG7nXGazLD7zI60cQZOH9O+Pey7zLJ3wu6WGCEa uQ8g== 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=P6aPVDykefLHu9vWbDWoJ+MolfROsTG/Ceq0Yzhn9jk=; b=udIOmVLktTTnXTqDg1Of1So4Jl2wdnHB0MdJWoJlo7Kvl6VMwqg2v+xicNrfShPamj JeNWbhsGjSrDiJrcutuGq5j7HFmUEKCK+b+V5+5QyC8SAt5eGjX1YPuNcHD17oY8gBmb vBk9ALiJ77yqpQqvkV209ObPKZ9ZJXT3Uov99fCIq6JonigmnVfykoq18F9aIgDTu7Yo YhSPKbcIsVdBuit2bnyTUD7HPJ2XI13GctMqBkZ4gb1dGr40jszrrIulkJUEx0eh2Puz oEarCx0yCgociSpfC0gsvRtGVkORQ4kp6sHL97GOMStFEcMOaLbcdTotPfiZq9Do4oSn GHQw== X-Gm-Message-State: APjAAAVaJiDCy1zQDVId8Br+oLkU00lTDr1oQNKMzvH293hOHgAChhMG q2lrOr0S6TAuwUKMAVMqVw== X-Received: by 2002:a1c:e3c2:: with SMTP id a185mr18023546wmh.27.1582499896239; Sun, 23 Feb 2020 15:18:16 -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.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Feb 2020 15:18:15 -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 18/30] mm/zsmalloc: Add missing annotation for zs_unmap_object() Date: Sun, 23 Feb 2020 23:16:59 +0000 Message-Id: <20200223231711.157699-19-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_unmap_object() context imbalance in zs_unmap_object() - unexpected unlock The root cause is the missing annotation at zs_unmap_object() Add the missing __releases(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 9d3f9b3d22aa..10a96651cb97 100644 --- a/mm/zsmalloc.c +++ b/mm/zsmalloc.c @@ -1349,6 +1349,7 @@ void *zs_map_object(struct zs_pool *pool, unsigned long handle, EXPORT_SYMBOL_GPL(zs_map_object); void zs_unmap_object(struct zs_pool *pool, unsigned long handle) + __releases(zspage) { struct zspage *zspage; struct page *page; -- 2.24.1