mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sudeep Holla <sudeep.holla@arm.com>
To: linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	"Sudeep Holla" <sudeep.holla@arm.com>,
	"Jens Wiklander" <jens.wiklander@linaro.org>,
	"Jérôme Forissier" <jerome.forissier@linaro.org>
Subject: [PATCH 0/3] firmware: arm_ffa: Fixes for FF-A notification handling
Date: Wed, 28 May 2025 09:49:40 +0100	[thread overview]
Message-ID: <20250528-ffa_notif_fix-v1-0-5ed7bc7f8437@arm.com> (raw)

This patch series improves the arm_ffa notification callback handling by
addressing safety and memory issues. It replaces a mutex with an rwlock
to prevent sleeping in atomic context, resolving kernel warnings. Memory
allocation is moved outside the lock to support this transition safely.
Additionally, a memory leak in the notifier unregistration path is fixed
by properly freeing the callback node.

Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
---
Sudeep Holla (3):
      firmware: arm_ffa: Fix memory leak by freeing notifier callback node
      firmware: arm_ffa: Move memory allocation outside the mutex locking
      firmware: arm_ffa: Replace mutex with rwlock to avoid sleep in atomic context

 drivers/firmware/arm_ffa/driver.c | 71 ++++++++++++++++++++-------------------
 1 file changed, 36 insertions(+), 35 deletions(-)
---
base-commit: 0ff41df1cb268fc69e703a08a57ee14ae967d0ca
change-id: 20250528-ffa_notif_fix-f90903a2ed0b
-- 
Regards,
Sudeep


             reply	other threads:[~2025-05-28  8:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-28  8:49 Sudeep Holla [this message]
2025-05-28  8:49 ` [PATCH 1/3] firmware: arm_ffa: Fix memory leak by freeing notifier callback node Sudeep Holla
2025-05-28 15:31   ` Jens Wiklander
2025-05-28  8:49 ` [PATCH 2/3] firmware: arm_ffa: Move memory allocation outside the mutex locking Sudeep Holla
2025-05-28 15:33   ` Jens Wiklander
2025-05-28  8:49 ` [PATCH 3/3] firmware: arm_ffa: Replace mutex with rwlock to avoid sleep in atomic context Sudeep Holla
2025-05-28 15:34   ` Jens Wiklander
2025-06-09 10:31 ` [PATCH 0/3] firmware: arm_ffa: Fixes for FF-A notification handling Sudeep Holla

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=20250528-ffa_notif_fix-v1-0-5ed7bc7f8437@arm.com \
    --to=sudeep.holla@arm.com \
    --cc=jens.wiklander@linaro.org \
    --cc=jerome.forissier@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®