From: Greg KH <gregkh@suse.de>
To: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Hank Janssen <hjanssen@microsoft.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Tom Hanrahan <hanrahat@microsoft.com>,
Hashir Abdi <habdi@microsoft.com>
Subject: Re: [patch] Staging: hv: Fix vmbus load hang caused by wrong data packing
Date: Mon, 12 Oct 2009 14:27:22 -0700 [thread overview]
Message-ID: <20091012212722.GA22118@suse.de> (raw)
In-Reply-To: <1FB5E1D5CA062146B38059374562DF7212DF127D@TK5EX14MBXC130.redmond.corp.microsoft.com>
On Mon, Oct 12, 2009 at 08:44:06PM +0000, Haiyang Zhang wrote:
> > Can you figure out why? What is the output of gcc for both ways?
> There are no build errors in either ways, I think it may be a bug in
> gcc handing __attribute__((packed)).
Of course there is not a build error. I mean what is the difference in
the assembly produced? Why is the __attribute__ version not the same
> > Can you show what is fixed by this change?
> Before the fix:
> The command "insmod hv_vmbus.ko" hangs.
> Root cause: The message data sent from Linux guest to HyperV host were
> not correctly packed and not recognized by HyperV host. So, the host
> doesn't acknowledge that the vmbus channel is set up. Then, the guest
> keeps on waiting for the event and hangs the insmod command.
>
> After the fix:
> The command "insmod hv_vmbus.ko" completes successfully with vmbus
> module loaded.
That's not showing me why the above fixed the problem.
> > Also note that #pragma packed is not supported by older versions of gcc,
> > so I don't think that it would work at all on some compiler versions
> > that are still legal to use for the kernel. But I'm not quite sure when
> > it was added, so I might be wrong.
> This pragma was used in older distro, such as SLES10 (kernel 2.6.16)
> without any problem.
What compiler version was that? Have you tried it on the lowest
required version of gcc?
> >From your newer email:
> > I also note that you are packing more structures here with this patch than the code before the patch had. Could that be the
> > issue here? The additional structures are ones that should be packed instead?
> No, the extra packed structures are not required for this bug fix. Just to make sure any future struct related to message is packed, so I put the pack() around the entire file.
Please wrap your email lines properly...
Your patch changes structures that it is needed for.
We need to find the root cause of _why_ your patch fixes the problem here,
that is what I am trying to get you to do.
thanks,
greg k-h
next prev parent reply other threads:[~2009-10-12 21:32 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-10 23:16 [patch] Staging: hv: Fix vmbus load hang caused by wrong data packing Haiyang Zhang
2009-10-12 15:30 ` Greg KH
2009-10-12 17:03 ` Haiyang Zhang
2009-10-12 17:29 ` Greg KH
2009-10-12 20:10 ` Hank Janssen
2009-10-12 20:22 ` Greg KH
2009-10-12 20:44 ` Haiyang Zhang
2009-10-12 21:27 ` Greg KH [this message]
2009-10-12 23:41 ` Haiyang Zhang
2009-10-13 5:08 ` Pekka Enberg
2009-10-16 20:03 ` Hank Janssen
2009-10-12 20:34 ` Greg KH
2009-10-16 20:11 ` [PATCH 1/1] Staging: hv: Fix vmbus load hang caused by faulty " Hank Janssen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091012212722.GA22118@suse.de \
--to=gregkh@suse.de \
--cc=habdi@microsoft.com \
--cc=haiyangz@microsoft.com \
--cc=hanrahat@microsoft.com \
--cc=hjanssen@microsoft.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.