[PATCH 1/3] fix OOPS in platform uevent

Stephen Hemminger
2007-09-20T19:10:45Z

[-- Attachment #1: sysfs-oops.patch --]
[-- Type: text/plain, Size: 616 bytes --]

Environment wasn't being NULL terminated.
Suggested by Kay Sievers

Fixes: http://bugzilla.kernel.org/show_bug.cgi?id=9034

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>

--- a/drivers/base/platform.c 2007-06-25 09:03:10.000000000 -0700
+++ b/drivers/base/platform.c 2007-09-20 11:35:57.000000000 -0700
@@ -546,6 +546,7 @@ static int platform_uevent(struct device
struct platform_device *pdev = to_platform_device(dev);

envp[0] = buffer;
+ envp[1] = NULL;
snprintf(buffer, buffer_size, "MODALIAS=%s", pdev->name);
return 0;
}