From: Mathieu Poirier <mathieu.poirier@linaro.org>
To: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/5] coresight: Fix DEBUG_LOCKS_WARN_ON for uninitialized attribute
Date: Mon, 29 Jul 2019 10:27:34 -0600 [thread overview]
Message-ID: <20190729162734.GA26214@xps15> (raw)
In-Reply-To: <20190724114312.1024-2-suzuki.poulose@arm.com>
Hi Suzuki,
On Wed, Jul 24, 2019 at 12:43:08PM +0100, Suzuki K Poulose wrote:
> While running the linux-nex with CONFIG_DEBUG_LOCKS_ALLOC enabled,
> I get the following splat.
>
> BUG: key ffffcb5636929298 has not been registered!
> ------------[ cut here ]------------
> DEBUG_LOCKS_WARN_ON(1)
> WARNING: CPU: 1 PID: 53 at kernel/locking/lockdep.c:3669 lockdep_init_map+0x164/0x1f0
> CPU: 1 PID: 53 Comm: kworker/1:1 Tainted: G W 5.2.0-next-20190712-00015-g00ad4634222e-dirty #603
> Workqueue: events amba_deferred_retry_func
> pstate: 60c00005 (nZCv daif +PAN +UAO)
> pc : lockdep_init_map+0x164/0x1f0
> lr : lockdep_init_map+0x164/0x1f0
>
> [ trimmed ]
>
> Call trace:
> lockdep_init_map+0x164/0x1f0
> __kernfs_create_file+0x9c/0x158
> sysfs_add_file_mode_ns+0xa8/0x1d0
> sysfs_add_file_to_group+0x88/0xd8
> etm_perf_add_symlink_sink+0xcc/0x138
> coresight_register+0x110/0x280
> tmc_probe+0x160/0x420
>
> [ trimmed ]
>
> ---[ end trace ab4cc669615ba1b0 ]---
>
> Fix this by initialising the dynamically allocated attribute properly.
>
> Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
> Fixes: bb8e370bdc141ddf ("coresight: perf: Add "sinks" group to PMU directory")
> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
> ---
> drivers/hwtracing/coresight/coresight-etm-perf.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/hwtracing/coresight/coresight-etm-perf.c b/drivers/hwtracing/coresight/coresight-etm-perf.c
> index 5c1ca0df5cb0..84f1dcb69827 100644
> --- a/drivers/hwtracing/coresight/coresight-etm-perf.c
> +++ b/drivers/hwtracing/coresight/coresight-etm-perf.c
> @@ -544,6 +544,7 @@ int etm_perf_add_symlink_sink(struct coresight_device *csdev)
> /* See function coresight_get_sink_by_id() to know where this is used */
> hash = hashlen_hash(hashlen_string(NULL, name));
>
> + sysfs_attr_init(&ea->attr.attr);
> ea->attr.attr.name = devm_kstrdup(dev, name, GFP_KERNEL);
> if (!ea->attr.attr.name)
> return -ENOMEM;
I've picked this up and marked it for stable.
Thanks,
Mathieu
> --
> 2.21.0
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-07-29 16:28 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-24 11:43 [PATCH 0/5] coresight: tmc error handling and misc fixes Suzuki K Poulose
2019-07-24 11:43 ` [PATCH 1/5] coresight: Fix DEBUG_LOCKS_WARN_ON for uninitialized attribute Suzuki K Poulose
2019-07-29 16:27 ` Mathieu Poirier [this message]
2019-07-24 11:43 ` [PATCH 2/5] coresight: funnel: Convert pr_warn to dev_warn for obsolete bindings Suzuki K Poulose
2019-07-29 17:00 ` Mathieu Poirier
2019-07-30 9:37 ` [PATCH 2/5] [UPDATED] coresight: " Suzuki K Poulose
2019-07-30 17:12 ` Mathieu Poirier
2019-07-24 11:43 ` [PATCH 3/5] coresight: etr_buf: Consolidate refcount initialization Suzuki K Poulose
2019-07-24 11:43 ` [PATCH 4/5] coresight: tmc-etr: Handle memory errors Suzuki K Poulose
2019-07-24 11:43 ` [PATCH 5/5] coresight: tmc-etr: Check if non-secure access is enabled Suzuki K Poulose
2019-07-29 19:49 ` Mathieu Poirier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190729162734.GA26214@xps15 \
--to=mathieu.poirier@linaro.org \
--cc=coresight@lists.linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=suzuki.poulose@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox