From nobody Sat Feb 7 06:21:12 2026 Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2B5C44315F for ; Thu, 6 Mar 2025 07:49:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=92.121.34.21 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741247347; cv=none; b=Xzhu1NtM2D5PfxlhHcri8JcKgHtVh1H8BfsRuCMIBJB+8LzLvVGbJDT0gaz94Fj9fbgb1rq4VLn8W5tKdnYsy5U+DvQGFAFV4LPWLkQKuA/FkUSQ1Q7+PLCzsPTn9ij7hzsXoLNR/NbtLKyanRPr/pmSN9Bj3spks/RZR82AfkI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741247347; c=relaxed/simple; bh=r2SNjSzrTJri8d4TezjFMm+gimnEBaOKUfo4+QtRBeI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=F3m0zMIHHzy1pLnqQI7PPC3t5EUVjnRGD0fmVtxGESkUw/n95O//ZgS/sEMWgYfaZ9kDOH4r3UXmyZYr2QR0RXfUW4X0BLGsJIwIp4Q2BJ0MVIZW4JYgnia0d6/bE+nyxCkcFY191FPpQbnew1zSSZI3wtW2tOnsxCyWed4aYA8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; arc=none smtp.client-ip=92.121.34.21 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 95C60200338; Thu, 6 Mar 2025 08:43:12 +0100 (CET) Received: from aprdc01srsp001v.ap-rdc01.nxp.com (aprdc01srsp001v.ap-rdc01.nxp.com [165.114.16.16]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 5C32F2003EE; Thu, 6 Mar 2025 08:43:12 +0100 (CET) Received: from lsv03121.swis.in-blr01.nxp.com (lsv03121.swis.in-blr01.nxp.com [92.120.146.118]) by aprdc01srsp001v.ap-rdc01.nxp.com (Postfix) with ESMTP id 1F7C31800086; Thu, 6 Mar 2025 15:43:09 +0800 (+08) From: Manjunatha Venkatesh To: miquel.raynal@bootlin.com, conor.culhane@silvaco.com, alexandre.belloni@bootlin.com, linux-i3c@lists.infradead.org, linux-kernel@vger.kernel.org Cc: manjunatha.venkatesh@nxp.com, rvmanjumce@gmail.com Subject: [PATCH v2] svc-i3c-master: Fix read from unreadable memory at svc_i3c_master_ibi_work() Date: Thu, 6 Mar 2025 13:13:03 +0530 Message-ID: <20250306074303.239081-1-manjunatha.venkatesh@nxp.com> X-Mailer: git-send-email 2.46.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: ClamAV using ClamSMTP Content-Type: text/plain; charset="utf-8" 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 --- Changes since v1: - Patch tittle updated as per the review feedback 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-i= 3c-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 =3D NULL; + data =3D 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 =3D NULL; + } } svc_i3c_master_emit_stop(master); break; --=20 2.46.1