All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Shishkin <alexander.shishkin@linux.intel.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-kernel@vger.kernel.org,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: [GIT PULL 2/7] intel_th: msu: Fix an uninitialized mutex
Date: Mon, 28 Oct 2019 09:06:46 +0200	[thread overview]
Message-ID: <20191028070651.9770-3-alexander.shishkin@linux.intel.com> (raw)
In-Reply-To: <20191028070651.9770-1-alexander.shishkin@linux.intel.com>

Commit 615c164da0eb ("intel_th: msu: Introduce buffer interface") added a
mutex that it forgot to initialize, resulting in a lockdep splat.

Fix that by initializing the mutex statically.

Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/hwtracing/intel_th/msu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hwtracing/intel_th/msu.c b/drivers/hwtracing/intel_th/msu.c
index fc9f15f36ad4..51021020fa3f 100644
--- a/drivers/hwtracing/intel_th/msu.c
+++ b/drivers/hwtracing/intel_th/msu.c
@@ -164,7 +164,7 @@ struct msc {
 };
 
 static LIST_HEAD(msu_buffer_list);
-static struct mutex msu_buffer_mutex;
+static DEFINE_MUTEX(msu_buffer_mutex);
 
 /**
  * struct msu_buffer_entry - internal MSU buffer bookkeeping
-- 
2.23.0


  parent reply	other threads:[~2019-10-28  7:07 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-28  7:06 [GIT PULL 0/7] intel_th: Fixes for v5.4 Alexander Shishkin
2019-10-28  7:06 ` [GIT PULL 1/7] intel_th: gth: Fix the window switching sequence Alexander Shishkin
2019-11-02 17:14   ` Greg Kroah-Hartman
2019-11-04  6:25     ` Alexander Shishkin
2019-11-04  6:35       ` Greg Kroah-Hartman
2019-11-04  6:54         ` Alexander Shishkin
2019-10-28  7:06 ` Alexander Shishkin [this message]
2019-11-02 17:14   ` [GIT PULL 2/7] intel_th: msu: Fix an uninitialized mutex Greg Kroah-Hartman
2019-11-04  6:27     ` Alexander Shishkin
2019-10-28  7:06 ` [GIT PULL 3/7] intel_th: msu: Fix missing allocation failure check on a kstrndup Alexander Shishkin
2019-10-28  7:06 ` [GIT PULL 4/7] intel_th: msu: Fix overflow in shift of an unsigned int Alexander Shishkin
2019-10-28  7:06 ` [GIT PULL 5/7] intel_th: msu: Fix possible memory leak in mode_store() Alexander Shishkin
2019-10-28  7:06 ` [GIT PULL 6/7] intel_th: pci: Add Comet Lake PCH support Alexander Shishkin
2019-10-28  7:06 ` [GIT PULL 7/7] intel_th: pci: Add Jasper " Alexander Shishkin
2019-11-04 14:02 ` [GIT PULL 0/7] intel_th: Fixes for v5.4 Greg Kroah-Hartman

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=20191028070651.9770-3-alexander.shishkin@linux.intel.com \
    --to=alexander.shishkin@linux.intel.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.