lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 11 Nov 2010 06:58:14 -0800 (PST)
From:	Fabio Estevam <fabioestevam@...oo.com>
To:	linux-kernel@...r.kernel.org
Cc:	sameo@...ux.intel.com, s.hauer@...gutronix.de,
	u.kleine-koenig@...gutronix.de
Subject: [PATCH] mfd: check for NULL platform data

Avoid kernel crash if platform data is NULL.

Signed-off-by: Fabio Estevam <fabio.estevam@...escale.com>
---
 drivers/mfd/mc13xxx-core.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/mfd/mc13xxx-core.c b/drivers/mfd/mc13xxx-core.c
index a2ac2ed..b4d6bb1 100644
--- a/drivers/mfd/mc13xxx-core.c
+++ b/drivers/mfd/mc13xxx-core.c
@@ -757,6 +757,9 @@ err_revision:
 
 	mc13xxx_unlock(mc13xxx);
 
+	if (pdata == NULL)
+		return 0;
+
 	if (pdata->flags & MC13XXX_USE_ADC)
 		mc13xxx_add_subdevice(mc13xxx, "%s-adc");
 
-- 
1.6.0.4



      
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ