[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8AFC7968D54FB448A30D8F38F259C5620E7B5EA9@TK5EX14MBXC114.redmond.corp.microsoft.com>
Date: Fri, 16 Oct 2009 20:03:35 +0000
From: Hank Janssen <hjanssen@...rosoft.com>
To: Pekka Enberg <penberg@...helsinki.fi>, Greg KH <gregkh@...e.de>
CC: Tom Hanrahan <hanrahat@...rosoft.com>,
Hashir Abdi <habdi@...rosoft.com>,
Haiyang Zhang <haiyangz@...rosoft.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [patch] Staging: hv: Fix vmbus load hang caused by wrong data
packing
Greg / Pecca,
>We don't merge fixes to the kernel unless we understand _why_ they fix
>things. It's pretty likely that the problem here is that one or more
>of the structs you are putting under "#pragma pack" just need to be
>annotated with "attribute packed".
We have figured out what the problem is with it.
It seems that the #pragma pack(push,1) doesn't change the size
of "enum vmbus_channel_message_type", the size remains as 4 bytes,
which is the default. I do not know if this is the result of
a gcc bug.
If you add __attribute__((packed)) here, the size becomes 1 byte,
which couldn't be accepted by HyperV host, and causes vmbus load
to hang.
So, the different behavior of #pragma pack(push,1) v.s.
__attribute__((packed)) on the data struct, "enum vmbus_channel_message_type",
caused this bug. The fix is to remove __attribute__((packed)) of this data.
We don't need to add #pragma pack(push,1) or #pragma pack(pop) here, since
it has no effect on this structure. (BTW, seems it's a bug of gcc's
handling of pragma pack().)
I will submit a patch later today that corrects the bug.
This patch in effect removes part of a previous patch somebody else
Submitted that introduced this problem.
This bug masked another problem we encountered as soon as we fixed this
Problem. I am getting a NULL pointer problem on insertion of the hv_vmbus
Driver. I will write a more detailed description of that problem and send
It to the list.
I checked the originally submitted code, and made that work with 2.6.32.
And that does run okay.
Thanks,
Hank.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists