+ make-ds1wm-driver-to-check-ds1wm_platform_data-pointer-against-null.patch added to -mm tree

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

 



The patch titled
     w1: make ds1wm driver to check ds1wm_platform_data pointer against NULL
has been added to the -mm tree.  Its filename is
     make-ds1wm-driver-to-check-ds1wm_platform_data-pointer-against-null.patch

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

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: w1: make ds1wm driver to check ds1wm_platform_data pointer against NULL
From: "eric miao" <eric.y.miao@xxxxxxxxx>

Do a sanity check for the "struct ds1wm_platform_data" pointer passed in by
the platform_device, and so to enforce each platform to provide a valid
structure.

Signed-off-by: eric miao <eric.miao@xxxxxxxxxxx>
Cc: "Szabolcs Gyurko" <szabolcs.gyurko@xxxxxx>
Cc: Evgeniy Polyakov <johnpol@xxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 drivers/w1/masters/ds1wm.c |    4 ++++
 1 file changed, 4 insertions(+)

diff -puN drivers/w1/masters/ds1wm.c~make-ds1wm-driver-to-check-ds1wm_platform_data-pointer-against-null drivers/w1/masters/ds1wm.c
--- a/drivers/w1/masters/ds1wm.c~make-ds1wm-driver-to-check-ds1wm_platform_data-pointer-against-null
+++ a/drivers/w1/masters/ds1wm.c
@@ -351,6 +351,10 @@ static int ds1wm_probe(struct platform_d
 		goto err0;
 	}
 	plat = pdev->dev.platform_data;
+	if (!plat) {
+		ret = -ENXIO;
+		goto err0;
+	}
 	ds1wm_data->bus_shift = plat->bus_shift;
 	ds1wm_data->pdev = pdev;
 	ds1wm_data->pdata = plat;
_

Patches currently in -mm which might be from eric.y.miao@xxxxxxxxx are

make-ds1wm-driver-to-check-ds1wm_platform_data-pointer-against-null.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