mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] driver: svc-i3c-master: Kernel panic issue fixed
@ 2025-02-24  3:17 Manjunatha Venkatesh
  2025-02-28 15:49 ` Frank Li
  0 siblings, 1 reply; 9+ messages in thread
From: Manjunatha Venkatesh @ 2025-02-24  3:17 UTC (permalink / raw)
  To: miquel.raynal, conor.culhane, alexandre.belloni, linux-i3c, linux-kernel
  Cc: manjunatha.venkatesh, rvmanjumce

I3C Master driver svc-i3c-master

As part of I3C driver probing sequence for particular device instance,
While adding to queue it is trying to access ibi variable of dev which is
not yet initialized causing "Unable to handle kernel read from unreadable
memory" resulting in kernel panic.

Signed-off-by: Manjunatha Venkatesh <manjunatha.venkatesh@nxp.com>
---
 drivers/i3c/master/svc-i3c-master.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/i3c/master/svc-i3c-master.c b/drivers/i3c/master/svc-i3c-master.c
index d6057d8c7dec..98c4d2e5cd8d 100644
--- a/drivers/i3c/master/svc-i3c-master.c
+++ b/drivers/i3c/master/svc-i3c-master.c
@@ -534,8 +534,11 @@ static void svc_i3c_master_ibi_work(struct work_struct *work)
 	switch (ibitype) {
 	case SVC_I3C_MSTATUS_IBITYPE_IBI:
 		if (dev) {
-			i3c_master_queue_ibi(dev, master->ibi.tbq_slot);
-			master->ibi.tbq_slot = NULL;
+			data = i3c_dev_get_master_data(dev);
+			if (master->ibi.slots[data->ibi]) {
+				i3c_master_queue_ibi(dev, master->ibi.tbq_slot);
+				master->ibi.tbq_slot = NULL;
+			}
 		}
 		svc_i3c_master_emit_stop(master);
 		break;
-- 
2.46.1


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2025-03-13 16:02 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-02-24  3:17 [PATCH] driver: svc-i3c-master: Kernel panic issue fixed Manjunatha Venkatesh
2025-02-28 15:49 ` Frank Li
2025-03-06  8:31   ` Manjunatha Venkatesh
2025-03-06 15:31     ` Frank Li
2025-03-07 12:34       ` Manjunatha Venkatesh
2025-03-07 15:18         ` Frank Li
2025-03-12 13:52           ` Manjunatha Venkatesh
2025-03-13  5:03           ` Manjunatha Venkatesh
2025-03-13 16:02             ` Frank Li

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®