From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx.prosyst.ru (m2.prosoftsystems.ru [46.48.77.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0CCE8486E45; Fri, 21 Aug 2026 12:37:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.48.77.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787315853; cv=none; b=qaMRDBYSFlolTjFnCQc4uXUa/cg8KxSQM02qRWR4kGMBN6q7cy28l1F2IdohCWkDHwGzQIeGcTwSKMMZO6aR/a4dvbg0LRdiW0eEPYfgsmkT/vUtBcGNZ5++ljguKEue5FJpXxxbpXcJ1FFUVEYSPUnn1JfdKmQnFzDBJUTWU/s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787315853; c=relaxed/simple; bh=REikZi9pApQc2ARh0zVtJvBm/nk2VLJbOUcBU7Yp5aM=; h=Content-Type:From:To:CC:Subject:Date:Message-ID:References: In-Reply-To:MIME-Version; b=JHqLx1Q/m2j9heIcCEn/iv6ZPwHWzyqqDobS2gTk3iScI0BLk92aEzxhvHMHg5TmJ0tWd5B4G+5Jmn5+YItd4cjjA3OIjCGQgUAPo9lwIY0YjVwOUbR11VwjeYX//kEYetnSXr6acEKWt27iA0b+i8QTEJkPTqqw5xp1+yz+hY0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=prosoftsystems.ru; spf=pass smtp.mailfrom=prosoftsystems.ru; dkim=pass (2048-bit key) header.d=prosoftsystems.ru header.i=@prosoftsystems.ru header.b=eGJ/+cz7; arc=none smtp.client-ip=46.48.77.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=prosoftsystems.ru Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=prosoftsystems.ru Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=prosoftsystems.ru header.i=@prosoftsystems.ru header.b="eGJ/+cz7" Content-Language: ru-RU Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; d=prosoftsystems.ru; s=ps; c=relaxed/relaxed; t=1787315841; h=from:to:date:message-id:subject; bh=ToqiBpcLxa4O7isOlNvqkO5oOViLjOPDY5eP115sBvo=; b=eGJ/+cz7gC9H7jfIxidLV/6/mGIQce41ID9u3HzgswP/EWRDCiEjUMGcJY0AGWSpG9Ru836v8A/ mjwBsSX9XeMXODFjSJctjdfofovqYVkaBZxYXgYsuAgan4R0fGyXDif4TqZtts4Zgqc4WKa+pVYdE uPw2FZcsWP82ElIHbn+hcIaXGrhbmEuhPfto2cRwE4DtOjmCdq+Bg1iSzDzyru/4Vbl6EPqAUMo3H XcSlrpwOe9vv2QD35WnlZspT8OhnQUTHw8TSp4MJkmn4UpBjCX70bN6mxKOw1cWsgSAa9hWOniqF9 4lmb1W++2b7BuCz2zIX8VDdN6CKucs0f7c2g== Received: from ECHO-3.prosoft.ural.ru (172.25.100.229) by mx.prosoftsystems.ru (172.21.240.33) with Microsoft SMTP Server (TLS) id 15.1.396.30; Fri, 21 Aug 2026 17:37:21 +0500 Received: from echo-2.prosoft.ural.ru (172.21.245.22) by ECHO-3.prosoft.ural.ru (172.25.100.229) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1748.39; Fri, 21 Aug 2026 17:37:21 +0500 Received: from echo-2.prosoft.ural.ru ([fe80::8f12:4f85:56d8:13ed]) by echo-2.prosoft.ural.ru ([fe80::8f12:4f85:56d8:13ed%17]) with mapi id 15.02.1748.039; Fri, 21 Aug 2026 17:37:21 +0500 From: =?koi8-r?B?9sHNwsHLycXXIPLBxMnKIPLJy8HSxMnOz9fJ3g==?= To: Aaro Koskinen CC: =?koi8-r?B?9sHNwsHLycXXIPLBxMnKIPLJy8HSxMnOz9fJ3g==?= , Andreas Kemnade , Kevin Hilman , Roger Quadros , "Tony Lindgren" , Lee Jones , Marcin Niestroj , Grygorii Strashko , "linux-omap@vger.kernel.org" , "mfd@lists.linux.dev" , "linux-kernel@vger.kernel.org" , "lvc-project@linuxtesting.org" , "stable@vger.kernel.org" Subject: [PATCH v2 1/4] mfd: tps65217: Fix NULL pointer dereference on IRQ init failure Thread-Topic: [PATCH v2 1/4] mfd: tps65217: Fix NULL pointer dereference on IRQ init failure Thread-Index: AQHdMWnPrDVNQQTGtE2VzJL7L1ar0A== Date: Fri, 21 Aug 2026 12:37:21 +0000 Message-ID: <20260821123712.260443-2-r.zhambakiev@prosoftsystems.ru> References: <20260821123712.260443-1-r.zhambakiev@prosoftsystems.ru> In-Reply-To: <20260821123712.260443-1-r.zhambakiev@prosoftsystems.ru> Accept-Language: ru-RU, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: Precedence: bulk X-Mailing-List: linux-omap@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 tps65217_probe() ignores the return value of tps65217_irq_init(), so when the irq domain creation fails the probe still completes and the driver ends up bound with a NULL tps->irq_domain. Unloading the module then makes tps65217_remove() call irq_domain_remove() on the NULL pointer and oops the kernel. On top of that, irq_find_mapping() may fall back to the default irq domain and dispose of mappings that belong to other interrupt controllers. Check the return value and abort the probe on failure so the error is reported and no inconsistent state is left for removal. Fixes: 6556bdacf646fcaa ("mfd: tps65217: Add support for IRQs") Cc: stable@vger.kernel.org Signed-off-by: Radiy Zhambakiev --- drivers/mfd/tps65217.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/mfd/tps65217.c b/drivers/mfd/tps65217.c index c240fac0ede7..2d04d9e0ae29 100644 --- a/drivers/mfd/tps65217.c +++ b/drivers/mfd/tps65217.c @@ -333,7 +333,9 @@ static int tps65217_probe(struct i2c_client *client) } =20 if (client->irq) { - tps65217_irq_init(tps, client->irq); + ret =3D tps65217_irq_init(tps, client->irq); + if (ret) + return ret; } else { int i; =20 --=20 2.53.0