linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Mike Leach <mike.leach@linaro.org>
To: linux-arm-kernel@lists.infradead.org, coresight@lists.linaro.org,
	mathieu.poirier@linaro.org, suzuki.poulose@arm.com
Cc: leo.yan@linaro.org, Mike Leach <mike.leach@linaro.org>
Subject: [PATCH v5 0/2]  Fix lockdep issues seen in CoreSight configfs interface
Date: Tue, 28 Jun 2022 18:30:02 +0100	[thread overview]
Message-ID: <20220628173004.30002-1-mike.leach@linaro.org> (raw)

Issues with lockdep possible deadlock scenarios have been reported when using the
coresight configfs interface handling complex configuration, when unloading modules.

These are due to holding the main configuration mutex during configfs register, but
taking it later when accessing configfs files.

The patches improve the clean up of configurations and update load and unload of
configurations and initialisation of configfs to fix the locking mechanisms.

Applies to coresight/next (5.19-rc2)
Tested on DB410c (with patch [0] also applied to fix separate console boot issue). 

Fixes: eb2ec49606c2 ("coresight: syscfg: Update load API for config loadable modules")
Reported-by: Suzuki Poulose <suzuki.poulose@arm.com>
Signed-off-by: Mike Leach <mike.leach@linaro.org>

[0] https://lkml.kernel.org/r/20220614124618.2830569-1-suzuki.poulose@arm.com

Changes since v4:
No functional change - fixed comment in patch header 1/2 and error string format to
remove checkpatch warning as requested by Mathieu.

Changes since v3:
Addressed minor issues raised by Suzuki.

Changes since v2:
Added additional work to fix load and unload ops after issue recurred
due to file access.

Mike Leach (2):
  coresight: configfs: Fix unload of configurations on module exit
  coresight: syscfg: Update load and unload operations

 .../hwtracing/coresight/coresight-config.h    |   2 +
 .../hwtracing/coresight/coresight-syscfg.c    | 298 +++++++++++++++---
 .../hwtracing/coresight/coresight-syscfg.h    |  13 +
 3 files changed, 261 insertions(+), 52 deletions(-)

-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

             reply	other threads:[~2022-06-28 17:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-28 17:30 Mike Leach [this message]
2022-06-28 17:30 ` [PATCH v5 1/2] coresight: configfs: Fix unload of configurations on module exit Mike Leach
2022-06-28 17:30 ` [PATCH v5 2/2] coresight: syscfg: Update load and unload operations Mike Leach
2022-06-29 15:42 ` [PATCH v5 0/2] Fix lockdep issues seen in CoreSight configfs interface 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=20220628173004.30002-1-mike.leach@linaro.org \
    --to=mike.leach@linaro.org \
    --cc=coresight@lists.linaro.org \
    --cc=leo.yan@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=mathieu.poirier@linaro.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;
as well as URLs for NNTP newsgroup(s).