Re: [patch] Staging: hv: Fix vmbus load hang caused by wrong datapacking

From: Greg KH
Date: Mon Oct 12 2009 - 11:34:18 EST


On Sat, Oct 10, 2009 at 11:16:00PM +0000, Haiyang Zhang wrote:
> From: Haiyang Zhang <haiyangz@xxxxxxxxxxxxx>
>
> Fix vmbus load hang caused by wrong data packing.
>
> Cc: Hank Janssen <hjanssen@xxxxxxxxxxxxx>
> Cc: Greg Kroah-Hartman <gregkh@xxxxxxx>
> Signed-off-by: Haiyang Zhang <haiyangz@xxxxxxxxxxxxx>
>
> ---
> diff --git a/drivers/staging/hv/ChannelMgmt.h b/drivers/staging/hv/ChannelMgmt.h
> index a839d8f..3f18584 100644
> --- a/drivers/staging/hv/ChannelMgmt.h
> +++ b/drivers/staging/hv/ChannelMgmt.h
> @@ -30,6 +30,8 @@
> #include "VmbusChannelInterface.h"
> #include "VmbusPacketFormat.h"
>
> +#pragma pack(push,1)
> +
> /* Version 1 messages */
> enum vmbus_channel_message_type {
> ChannelMessageInvalid = 0,
> @@ -54,24 +56,24 @@ enum vmbus_channel_message_type {
> ChannelMessageViewRangeRemove = 18,
> #endif
> ChannelMessageCount
> -} __attribute__((packed));

Why the change here? Isn't this doing the same thing?

And I'm guessing that not all of these structures are needing to be
packed, right? Are they all shared across the HV boundry?

And is this fixing the problem that Hank and users have reported with
the current code? Does this need to get into the 2.6.32 release?

thanks,

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