Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp2168430ybv; Fri, 14 Feb 2020 12:52:36 -0800 (PST) X-Google-Smtp-Source: APXvYqwaJU0rtdc3Ckz9iHkLdaV7Ate1GLToeuCeEkPBN5GYd4Qh+TB3W8svFTEPHRb08npeS83I X-Received: by 2002:a9d:7842:: with SMTP id c2mr3510711otm.252.1581713556131; Fri, 14 Feb 2020 12:52:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581713556; cv=none; d=google.com; s=arc-20160816; b=Ldg5X0hxn0Wns8FZLGYRg2avGofQ79qrLU5034tU/tf6hhvDlsr6/RbAeskK84yajs NTs37z284UyAOQeaDo8PmnlLGD5i5WhczrA8El43ukSaLLA4zyWVOH0AK8m4m4RihTg2 1DwxAJKyugPikRn0q7nmsCvRLoy/G+iV+mbHTG32dA8eJw1MKwSTrctmIvB9WbHTz3hr Vz8x5ojIxtXJRZz98TbOj+gxCjJxHnb+9+L+w9d/A1t3HRSJkG7f1TmViVUH4473j68A nLuDRUxRKDfYKW6ukDJCvdMaq/dRYoUvX3EAQ9QS4MpKSq762AOAbSRgCJYHkWm197LF 3saA== 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=tPSIqzx9vIZmVccTZdN79SZaoDc7U8iHLI6k79OYee8=; b=D4xNNCcfXUSMx3DHJj4cOJI6WgBiTZ5Waz3yRKJ6aK6E8v0lyIE0xS4tR/jAB/1cA+ RxdBZqa+OUZzipHKIwhDQ5SYemA2mVEvZRVQooygo6lRafd3cqLTZ4bCvhN9rIZNXros UWja9RQkGYgpUU6mEVwqssmVjWt86/ul6Tg/JtaFMn1cldRa9qWMvjK4I+w8uhEyMKVa E1VEF3pOXyGmr86BxQHPew+eR2F18mzqJ5kn4zp+/3gs5T1UgSPgh79w2bTdeV3jkfQt zdnTFvIwW3Y8btErgLmjcc+NzMGfgfAW7I+9JTn9HAkt4Wo6RMJOA7tvQUO88FHIwqaG SDtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=SAs7Wj9i; 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 p3si3310261oih.186.2020.02.14.12.52.24; Fri, 14 Feb 2020 12:52:36 -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=SAs7Wj9i; 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 S2388198AbgBNUsr (ORCPT + 99 others); Fri, 14 Feb 2020 15:48:47 -0500 Received: from mail-wr1-f67.google.com ([209.85.221.67]:35339 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387963AbgBNUsp (ORCPT ); Fri, 14 Feb 2020 15:48:45 -0500 Received: by mail-wr1-f67.google.com with SMTP id w12so12470124wrt.2 for ; Fri, 14 Feb 2020 12:48:44 -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=tPSIqzx9vIZmVccTZdN79SZaoDc7U8iHLI6k79OYee8=; b=SAs7Wj9iHmb/zSwkTvomEzdPbXq05Sd9SaBEFloQT7W0rfNjR9tK19jHCfSIwa/dUm XR0rMeBEPnCmXd3X1lvxtlyTyJjVqoWcpb4IFPIZ5hICg6Vb3mXfBQ65NOCGrzo1QLhs 0D02676HGo5ppmbbpbdyg594eE163CNSxpzrM1IU8Vr35ikBgantlnwews8zOklU1sED S6MWwQrm/GL36VREjr1N9KgwSyK+N0i44mcb861KvthYaN28zGAR2JLi+u7YThgEBNR3 D1nMQjzSQKJOgwccLk5YZFEDVOiaqiu291FZosOTzK36BpyVDA1PYQWFeFbgi4P8SccC i0OA== 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=tPSIqzx9vIZmVccTZdN79SZaoDc7U8iHLI6k79OYee8=; b=JdWG/l/m4tWQ5FHtSK/DkZW7jlLnH1VkS5mhRkPfZCrbtyXDTyUEz9Hrq/zKiAYBdB R0ie6sZeUKvRPQskH/r0KuxRpkYAleNUTJwFFVpVtfNb3H04f1zXk0KcFQlU0hgcTRDE yDAAE8uzxk8BYMyrTAKTuaTXuJo/e80M2UP1AtAqTt+Ey6r+nSLy2FyleGV2ncQgPbQZ javzy7eYBhEFHYnlxn78dDQG6iTHI1LFamX9hkLY1vK6ucfbDttacEvxEGr3rM2mcgFL +zp0xvmZyXIkQT1c5Yozuy4J2PeIW30oGHs9T6edYCzlZ7OcgqBu1ogJTkUS3vazlVUQ vfYw== X-Gm-Message-State: APjAAAV1QDiK8YLEptvB7tvhvBJCcTOukHmTbHvW4PLeBQojgHImqQ1K ZWcJFq1iVVifw2BikSP7lyGHnjZegEYa X-Received: by 2002:a5d:6987:: with SMTP id g7mr5612512wru.422.1581713323059; Fri, 14 Feb 2020 12:48:43 -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.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Feb 2020 12:48:42 -0800 (PST) From: Jules Irenge To: linux-kernel@vger.kernel.org Cc: boqun.feng@gmail.com, Jules Irenge , Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , linux-mm@kvack.org (open list:SLAB ALLOCATOR) Subject: [PATCH 08/30] mm/slub: Add missing annotation for get_map() Date: Fri, 14 Feb 2020 20:47:19 +0000 Message-Id: <20200214204741.94112-9-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 get_map()() warning: context imbalance in get_map() - wrong count at exit The root cause is the missing annotation at get_map() Add the missing __acquires(&object_map_lock) annotation Signed-off-by: Jules Irenge --- mm/slub.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mm/slub.c b/mm/slub.c index 17dc00e33115..3c6d348afcf9 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -449,6 +449,7 @@ static DEFINE_SPINLOCK(object_map_lock); * not vanish from under us. */ static unsigned long *get_map(struct kmem_cache *s, struct page *page) + __acquires(&object_map_lock) { void *p; void *addr = page_address(page); -- 2.24.1