Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2009117imu; Fri, 14 Dec 2018 04:26:40 -0800 (PST) X-Google-Smtp-Source: AFSGD/UjGe7xe0ifLJu5N6iEVykwQzHCMoXeqhAe0MXQ3fhwG3hzMfSMP3yaeuRlQlXoFHgj3KSv X-Received: by 2002:a63:df13:: with SMTP id u19mr2557854pgg.294.1544790400536; Fri, 14 Dec 2018 04:26:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544790400; cv=none; d=google.com; s=arc-20160816; b=xd3xchfCO7QzvnHrC8Y2yxp/f2IgIeKZpYT7QlXICE13+ZJRAMVTVv2WeBBToWe7aE +dej3jK/w9mcPrkDQ/9yjFHXlGg3kvKhFNhZ32GI7gogfd+qgCNO+rWFzGEwp5jl+hQK RUYpp00WMmpvIijgC41B0qXB2Z79Qg2T82Ef/wQSu1GTr0nrO3p9YtBPQAGiXQY26q/4 rOWDhgdWt7ZdOVkITnOlWuXOxG17yCJd3R5vtSx+wKFMC9Sdy//0jbgEPBukqNnuk8bx MYmT+fI7bMunlKQ3BitoTZ/Dy4cRiObbkCfINTYVyOBwaYRKbAYVXR14jG9RkE+rCSyI cKGg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=/JlJCm06xvXWE5PDp21nmLhovrRzNfcqs3TNreAYn9w=; b=cNv1PPW16jyczTY7D9S3prKakhn9PDgnNejpBabq3ve2y+mSHkCOitSlq90J1STq66 /dC0REESKco88ULFBjldPAC/8RsKU9KLKzPTY/oVeb1K9FGO5SlX/9SHCObtE1JZQukU aidOOkXTyaK6yQ7FAS4UdxQ2uigzCiK4ZT5R3DQcIES289LBFXkCILft/krmmU1ESAFW 07gzMBUieOTYBpinyuj46l/WDNgtu3g+6iYFQUXWFxlYR5zpCTNKHiuf7rh5D30Bylnc RzHIj7N9VKU51dZwUMqrhX4Pl4IVwO+avCG5xikzSUpNZGO0J/OruLuh9CCAEVfISrHI KOjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Wtjfii6M; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u9si4040654pge.48.2018.12.14.04.26.25; Fri, 14 Dec 2018 04:26:40 -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=@kernel.org header.s=default header.b=Wtjfii6M; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732054AbeLNMNF (ORCPT + 99 others); Fri, 14 Dec 2018 07:13:05 -0500 Received: from mail.kernel.org ([198.145.29.99]:60418 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732038AbeLNMNA (ORCPT ); Fri, 14 Dec 2018 07:13:00 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 627B8214E0; Fri, 14 Dec 2018 12:12:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1544789579; bh=i4HRo9AP6vgh9vki2wwv5B7kuWDS+R3shSEtx7Hac0Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Wtjfii6M5eLEgXi7+6/mfYKwsSukrO4PevT+tI04X+mzR8xDgqGD6gvg9rCRJuWua ey2s58YVYSF8Jd1bLu15WZVUjDAWh0NTs2OPdglxqMvEjtm6p0DdNJsZaJsv1BYqaH CogBQSmc3tgQrAtviiPe8XaFGMKHU+KgKBcqMyJU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Qian Cai , Catalin Marinas , Waiman Long , Thomas Gleixner , Yang Shi , Arnd Bergmann , Andrew Morton , Linus Torvalds , Sasha Levin Subject: [PATCH 4.9 48/51] debugobjects: avoid recursive calls with kmemleak Date: Fri, 14 Dec 2018 13:00:50 +0100 Message-Id: <20181214115717.349699934@linuxfoundation.org> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20181214115713.244259772@linuxfoundation.org> References: <20181214115713.244259772@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit 8de456cf87ba863e028c4dd01bae44255ce3d835 ] CONFIG_DEBUG_OBJECTS_RCU_HEAD does not play well with kmemleak due to recursive calls. fill_pool kmemleak_ignore make_black_object put_object __call_rcu (kernel/rcu/tree.c) debug_rcu_head_queue debug_object_activate debug_object_init fill_pool kmemleak_ignore make_black_object ... So add SLAB_NOLEAKTRACE to kmem_cache_create() to not register newly allocated debug objects at all. Link: http://lkml.kernel.org/r/20181126165343.2339-1-cai@gmx.us Signed-off-by: Qian Cai Suggested-by: Catalin Marinas Acked-by: Waiman Long Acked-by: Catalin Marinas Cc: Thomas Gleixner Cc: Yang Shi Cc: Arnd Bergmann Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Sasha Levin --- lib/debugobjects.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/debugobjects.c b/lib/debugobjects.c index 88580e8ee39e..1c43d4c5d2ab 100644 --- a/lib/debugobjects.c +++ b/lib/debugobjects.c @@ -1110,7 +1110,8 @@ void __init debug_objects_mem_init(void) obj_cache = kmem_cache_create("debug_objects_cache", sizeof (struct debug_obj), 0, - SLAB_DEBUG_OBJECTS, NULL); + SLAB_DEBUG_OBJECTS | SLAB_NOLEAKTRACE, + NULL); if (!obj_cache || debug_objects_replace_static_objects()) { debug_objects_enabled = 0; -- 2.19.1