+ drivers-rtc-rtc-max8998c-check-for-pdata-presence-before-dereferencing.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Subject: + drivers-rtc-rtc-max8998c-check-for-pdata-presence-before-dereferencing.patch added to -mm tree
To: t.figa@xxxxxxxxxxx,jg1.han@xxxxxxxxxxx,kyungmin.park@xxxxxxxxxxx,sachin.kamat@xxxxxxxxxx
From: akpm@xxxxxxxxxxxxxxxxxxxx
Date: Thu, 23 May 2013 16:55:13 -0700


The patch titled
     Subject: drivers/rtc/rtc-max8998.c: check for pdata presence before dereferencing
has been added to the -mm tree.  Its filename is
     drivers-rtc-rtc-max8998c-check-for-pdata-presence-before-dereferencing.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Tomasz Figa <t.figa@xxxxxxxxxxx>
Subject: drivers/rtc/rtc-max8998.c: check for pdata presence before dereferencing

Currently the driver can crash with a NULL pointer dereference if no pdata
is provided, despite of successful registration of the MFD part.  This
patch fixes the problem by adding a NULL check before dereferencing the
pdata pointer.

Signed-off-by: Tomasz Figa <t.figa@xxxxxxxxxxx>
Signed-off-by: Kyungmin Park <kyungmin.park@xxxxxxxxxxx>
Cc: Sachin Kamat <sachin.kamat@xxxxxxxxxx>
Reviewed-by: Jingoo Han <jg1.han@xxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 drivers/rtc/rtc-max8998.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN drivers/rtc/rtc-max8998.c~drivers-rtc-rtc-max8998c-check-for-pdata-presence-before-dereferencing drivers/rtc/rtc-max8998.c
--- a/drivers/rtc/rtc-max8998.c~drivers-rtc-rtc-max8998c-check-for-pdata-presence-before-dereferencing
+++ a/drivers/rtc/rtc-max8998.c
@@ -285,7 +285,7 @@ static int max8998_rtc_probe(struct plat
 			info->irq, ret);
 
 	dev_info(&pdev->dev, "RTC CHIP NAME: %s\n", pdev->id_entry->name);
-	if (pdata->rtc_delay) {
+	if (pdata && pdata->rtc_delay) {
 		info->lp3974_bug_workaround = true;
 		dev_warn(&pdev->dev, "LP3974 with RTC REGERR option."
 				" RTC updates will be extremely slow.\n");
_

Patches currently in -mm which might be from t.figa@xxxxxxxxxxx are

linux-next.patch
drivers-rtc-rtc-max8998c-check-for-pdata-presence-before-dereferencing.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux