From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 61B77C4363A for ; Wed, 28 Oct 2020 22:25:45 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EC027206F4 for ; Wed, 28 Oct 2020 22:25:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="AmVVv9Sw" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EC027206F4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=OdFidkmCicQz7E/a9bWqut/ds9/tBhb6PGHqZbDMblw=; b=AmVVv9SwUt3EK5OeGCiKZ4YWu I66Wn2Nn617q7bhTTdYkLKhF9fEWuzF0avyZrG2TkbOJXdJqCHbIFxtphl7gfqaGt750+tbTxIFZe KZqYSr8DtegumfXpxatqMfAmjIxyrdx0DscjL4SOgCx6d/nLa369pmkQ31ygNk8+KaGIKLjCwopJR RlM2S9jiyk/q//rQtwr0/CktpSdQBalYaxMYHBV4qaYB4sYZwyixflmLr8q1u4tuxN7OyWRvjy/d6 7I7XnHEFwPPHKHNKstSy3l/srhJ7SLNgCZCMyXugLjWnZKvI0cX3oudl8OIUOzz6Phcfq6ITdKEac B1dmTzJCQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kXtsO-0002lN-FQ; Wed, 28 Oct 2020 22:25:04 +0000 Received: from foss.arm.com ([217.140.110.172]) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kXti8-0006MI-Kk for linux-arm-kernel@lists.infradead.org; Wed, 28 Oct 2020 22:14:29 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id D5B7D139F; Wed, 28 Oct 2020 15:14:27 -0700 (PDT) Received: from [10.57.18.142] (unknown [10.57.18.142]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 02AD93F68F; Wed, 28 Oct 2020 15:14:26 -0700 (PDT) Subject: Re: [PATCH] coresight: cti: Initialize dynamic sysfs attributes To: Mathieu Poirier References: <20201028105453.3027227-1-suzuki.poulose@arm.com> <20201028191624.GA1184908@xps15> From: Suzuki K Poulose Message-ID: Date: Wed, 28 Oct 2020 22:14:26 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: <20201028191624.GA1184908@xps15> Content-Language: en-GB X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201028_181428_864092_095EDC86 X-CRM114-Status: GOOD ( 14.40 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: coresight@lists.linaro.org, Mike Leach , linux-arm-kernel@lists.infradead.org, leo.yan@linaro.org Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 10/28/20 7:16 PM, Mathieu Poirier wrote: > On Wed, Oct 28, 2020 at 10:54:53AM +0000, Suzuki K Poulose wrote: >> With LOCKDEP enabled, CTI driver triggers the following splat due >> to uninitialized lock class for dynamically allocated attribute >> objects. >> >> [ 5.372901] coresight etm0: CPU0: ETM v4.0 initialized >> [ 5.376694] coresight etm1: CPU1: ETM v4.0 initialized >> [ 5.380785] coresight etm2: CPU2: ETM v4.0 initialized >> [ 5.385851] coresight etm3: CPU3: ETM v4.0 initialized >> [ 5.389808] BUG: key ffff00000564a798 has not been registered! >> [ 5.392456] ------------[ cut here ]------------ >> [ 5.398195] DEBUG_LOCKS_WARN_ON(1) >> [ 5.398233] WARNING: CPU: 1 PID: 32 at kernel/locking/lockdep.c:4623 lockdep_init_map_waits+0x14c/0x260 >> [ 5.406149] Modules linked in: >> [ 5.415411] CPU: 1 PID: 32 Comm: kworker/1:1 Not tainted 5.9.0-12034-gbbe85027ce80 #51 >> [ 5.418553] Hardware name: Qualcomm Technologies, Inc. APQ 8016 SBC (DT) >> [ 5.426453] Workqueue: events amba_deferred_retry_func >> [ 5.433299] pstate: 40000005 (nZcv daif -PAN -UAO -TCO BTYPE=--) >> [ 5.438252] pc : lockdep_init_map_waits+0x14c/0x260 >> [ 5.444410] lr : lockdep_init_map_waits+0x14c/0x260 >> [ 5.449007] sp : ffff800012bbb720 >> ... >> >> [ 5.531561] Call trace: >> [ 5.536847] lockdep_init_map_waits+0x14c/0x260 >> [ 5.539027] __kernfs_create_file+0xa8/0x1c8 >> [ 5.543539] sysfs_add_file_mode_ns+0xd0/0x208 >> [ 5.548054] internal_create_group+0x118/0x3c8 >> [ 5.552307] internal_create_groups+0x58/0xb8 >> [ 5.556733] sysfs_create_groups+0x2c/0x38 >> [ 5.561160] device_add+0x2d8/0x768 >> [ 5.565148] device_register+0x28/0x38 >> [ 5.568537] coresight_register+0xf8/0x320 >> [ 5.572358] cti_probe+0x1b0/0x3f0 >> >> ... >> >> Fix this by initializing the attributes when they are allocated. >> >> Fixes : 3c5597e398124 ("coresight: cti: Add connection information to sysfs") > > This needs to be 12 rather than 13 characters. I have made the modification and > applied your changes. > Thanks Mathieu. Sorry for missing the checkpath run. Cheers Suzuki _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel