2009-10-28 22:28:51

by Milan Dadok

[permalink] [raw]
Subject: [PATCH] 1/4 staging: hv: fix oops in vmbus - udev events

Fix typos in udev event send and guid variables copy

Signed-off-by: Milan Dadok <[email protected]>

---
diff -uprN -X /usr/src/linux/Documentation/dontdiff
/usr/src/linux-2.6.32-rc5/drivers/staging/hv/vmbus_drv.c
/usr/src/linux/drivers/staging/hv/vmbus_drv.c
--- /usr/src/linux-2.6.32-rc5/drivers/staging/hv/vmbus_drv.c 2009-10-28
18:13:04.000000000 +0100
+++ /usr/src/linux/drivers/staging/hv/vmbus_drv.c 2009-10-28
17:53:29.000000000 +0100
@@ -507,12 +507,12 @@ static struct hv_device *vmbus_child_dev

child_device_obj = &child_device_ctx->device_obj;
child_device_obj->context = context;
- memcpy(&child_device_obj->deviceType, &type, sizeof(struct
hv_guid));
- memcpy(&child_device_obj->deviceInstance, &instance,
+ memcpy(&child_device_obj->deviceType, type, sizeof(struct hv_guid));
+ memcpy(&child_device_obj->deviceInstance, instance,
sizeof(struct hv_guid));

- memcpy(&child_device_ctx->class_id, &type, sizeof(struct hv_guid));
- memcpy(&child_device_ctx->device_id, &instance, sizeof(struct
hv_guid));
+ memcpy(&child_device_ctx->class_id, type, sizeof(struct hv_guid));
+ memcpy(&child_device_ctx->device_id, instance, sizeof(struct
hv_guid));

DPRINT_EXIT(VMBUS_DRV);

@@ -623,8 +611,6 @@ static void vmbus_child_device_destroy(s
static int vmbus_uevent(struct device *device, struct kobj_uevent_env *env)
{
struct device_context *device_ctx =
device_to_device_context(device);
- int i = 0;
- int len = 0;
int ret;

DPRINT_ENTER(VMBUS_DRV);
@@ -644,8 +630,6 @@ static int vmbus_uevent(struct device *d
device_ctx->class_id.data[14],
device_ctx->class_id.data[15]);

- env->envp_idx = i;
- env->buflen = len;
ret = add_uevent_var(env, "VMBUS_DEVICE_CLASS_GUID={"
"%02x%02x%02x%02x-%02x%02x-%02x%02x-"
"%02x%02x%02x%02x%02x%02x%02x%02x}",
@@ -691,8 +675,6 @@ static int vmbus_uevent(struct device *d
if (ret)
return ret;

- env->envp[env->envp_idx] = NULL;
-
DPRINT_EXIT(VMBUS_DRV);

return 0;
---


2009-10-28 22:48:05

by Hank Janssen

[permalink] [raw]
Subject: RE: [PATCH] 1/4 staging: hv: fix oops in vmbus - udev events


Milan,

First of all thanks for these patches!

Greg, I do have a request though. But I am not sure what the right approach is. This
Patch removes more than I would like. It takes out a few things that I would like to
Keep in because I need them for prior versions of the kernel that we also have this
Running on.

What is the suggested approach in this case. Can I submit a patch instead of this one
That keeps some of these items still in?

Thanks,

Hank.


-----Original Message-----
From: Milan Dadok [mailto:[email protected]]
Sent: Wednesday, October 28, 2009 3:23 PM
To: 'Greg Kroah-Hartman'
Cc: [email protected]; Hank Janssen; Haiyang Zhang
Subject: [PATCH] 1/4 staging: hv: fix oops in vmbus - udev events

Fix typos in udev event send and guid variables copy

Signed-off-by: Milan Dadok <[email protected]>

---

SNIPPAGE!

- int i = 0;
- int len = 0;
int ret;

- env->envp_idx = i;
- env->buflen = len;

SNIP AND MORE SNIP

- env->envp[env->envp_idx] = NULL;
-
DPRINT_EXIT(VMBUS_DRV);


2009-10-28 23:01:33

by Greg KH

[permalink] [raw]
Subject: Re: [PATCH] 1/4 staging: hv: fix oops in vmbus - udev events

A: No.
Q: Should I include quotations after my reply?

http://daringfireball.net/2007/07/on_top

This is seriously annoying, and is something that the lkml mailing list
operators have said they will start blocking soon. Please remember it.

On Wed, Oct 28, 2009 at 10:48:06PM +0000, Hank Janssen wrote:
>
> Milan,
>
> First of all thanks for these patches!
>
> Greg, I do have a request though. But I am not sure what the right
> approach is. This Patch removes more than I would like. It takes out a
> few things that I would like to Keep in because I need them for prior
> versions of the kernel that we also have this Running on.

I don't understand, what in this patch is needed for older kernels?
This patch only fixes a bug that was preventing uevents from being sent
to userspace.

Also, we don't support older kernel versions in the in-kernel version of
the code, that just does not make any sense, and is why all of that old
stuff was ripped out.

> What is the suggested approach in this case. Can I submit a patch
> instead of this one That keeps some of these items still in?

Sure, what does the patch look like?

thanks,

greg k-h