Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796039703; b=EhHbU3druKV4TbE3cF2qLzdTJNScXIf9Km4h4h6yWrOb+p7QYYvqQhmUZqwfjFUY8EUk Y/6SYHjayvEyhcxEgzcDqC6zLhVaB4UIHrh3W1OgmQIEkkhG7P5k1BZaLc1ypZlyLjdIk G1ndVL5Jw+AG6fNnSWvlaHK6AM8BQoH677dpZodd9+cXF4bnrkxHomFPIRvPGm/7/rNBg TzkXtZLjYzd/NI2yMvn9jc1c+hC+W6Fh7dGlhM5o0gQEq0HoHGlfP73h03Ma9j4V0+7Qh DEJoITzgbdHi5wgmz73YqkjP9EUrEse+OBG6eo8zMs3FQ3g1x7wKaP1Vm/hV5AOKjAA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796039703; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=RpneZLPn71uAgSvPNio/5oX7DXfkhgfMwTmskQG7iFE=; b=aUuBmzL1+JVaxxnidwcFrrvlSFtx/fKGI37cCjznthN32rsKUuBZ/QWWTGqBmlb7TVO8 HUgb0Qgr5u+hCRxNm/U+BsIogRs810bVwBAhXBSCNonn1N6xsOHSnK5qjS9besLlQl5Yd 5dnmn9edZbihvS/Kr3TvWlpzozTRoUF3GNrrhgyamFI9kEIOgjORpJbBNTz/s8CtiACqF qROiE6ZzeeZ4CzxTiRZCUifRo/bHHtqy9IJsGU6EdLjvG0skY1urC0AXOqg/20f6aJDoY 7j9hnyStwQENlgErA6eyp1408/nZIjKJ1RkkqeSXe2a1nevN3OI05epYh0iur16L+oA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Q7W5Rk+n; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A3BA6606A31C for ; Mon, 30 Nov 2026 11:55:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Q7W5Rk+n Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8C1DD1F00924; Mon, 30 Nov 2026 11:55:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796039702; bh=RpneZLPn71uAgSvPNio/5oX7DXfkhgfMwTmskQG7iFE=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=Q7W5Rk+nJEzdCVzeMwvq2AESKeziQLjks0vrDbrMbQEMK62llnfucLHishoap+afq k2YK85lua83qvNVvf5Jq+CYZ7vrb5pF95q/HQvapSMjP+g+TmAsPnD1COT5z9pQZEX CIqOl8+weqNjxe/L+K/k1cpWvKKMKA1Yrr2X1fCitVL1j8Tp2ECbvtBMGkR9Yi4lcV IWtmoLML5aBQ3FerhZuWSDdWVRdja/B2m8wA1GX+dK9fmdATymQ0zL+TYL3rAgDtXN ylqcwMyx4YeiCUdAvMfn+jHpfLrCsEMzGf8UHAu4iMsEC4N/ULF8PT4ljSCLyyurlA jwGKvjKTcJneg== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v9 01/13] drm: Add MIPI DBI bus support for MIPI DBI Type A and B Reply-To: sashiko-reviews@lists.linux.dev To: "Svyatoslav Ryhel" Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org In-Reply-To: <20261130114155.72920-2-clamor95@gmail.com> References: <20261130114155.72920-1-clamor95@gmail.com> <20261130114155.72920-2-clamor95@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Mon, 30 Nov 2026 11:55:02 +0000 X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [High] drm: NULL pointer dereference in mipi_dbi_bus_shutdown() on unbound device -- commit a575546c0815e7093e5a3e166f417f51579ae7fa Author: Svyatoslav Ryhel drm: Add MIPI DBI bus support for MIPI DBI Type A and B This commit adds a Linux driver model bus and helpers for MIPI DBI Type A and Type B hosts and peripherals. > diff --git a/drivers/gpu/drm/drm_mipi_dbi_bus.c b/drivers/gpu/drm/drm_mip= i_dbi_bus.c > new file mode 100644 > index 0000000000000..0c9b93d72021b > --- /dev/null > +++ b/drivers/gpu/drm/drm_mipi_dbi_bus.c > @@ -0,0 +1,265 @@ [ ... ] > +static void mipi_dbi_bus_shutdown(struct device *dev) > +{ > + struct mipi_dbi_driver *drv =3D to_mipi_dbi_driver(dev->driver); > + struct mipi_dbi_device *dbidev =3D to_mipi_dbi_device(dev); > + > + if (drv->shutdown) > + drv->shutdown(dbidev); > +} > + > +static const struct bus_type mipi_dbi_bus_type =3D { > + .name =3D "mipi-dbi", > + .match =3D of_driver_match_device, > + .uevent =3D of_device_uevent_modalias, > + .probe =3D mipi_dbi_bus_probe, > + .remove =3D mipi_dbi_bus_remove, > + .shutdown =3D mipi_dbi_bus_shutdown, > +}; [Severity: High] Can mipi_dbi_bus_shutdown() cause a NULL pointer dereference when a registered mipi_dbi_device has no bound driver? device_shutdown() invokes dev->bus->shutdown(dev) unconditionally without checking whether dev->driver is set: drivers/base/core.c:device_shutdown() { ... if (dev->bus && dev->bus->shutdown) { if (initcall_debug) dev_info(dev, "shutdown\n"); dev->bus->shutdown(dev); } else if (dev->driver && dev->driver->shutdown) { ... } Because driver is the first member of struct mipi_dbi_driver, to_mipi_dbi_driver(NULL) evaluates to NULL and checking drv->shutdown dereferences NULL during system shutdown if a peripheral driver was not loaded, deferred probing, or was unbound. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261130114155.7292= 0-1-clamor95@gmail.com?part=3D1