Patchwork [for,stable/back-port] staging: vt6656: fix headers - key.c only

login
register
mail settings
Submitter Malcolm Priestley
Date Dec. 29, 2012, 1:10 p.m.
Message ID <1356786603.12488.10.camel@canaries64>
Download mbox | patch
Permalink /patch/209024/
State New
Headers show

Comments

Malcolm Priestley - Dec. 29, 2012, 1:10 p.m.
shorted back-ported version of upstream commit
11d404cb56ecd53bb23499897fbe7be1a9ac4827
staging: vt6656: fix headers and add cfg80211.
key.c only

This patch fixes the deadlock of 64 bit systems
on successful association.

In key.h void pointer pvKeyTable in SKeyItem is out of alignment
on 64 bit kernel.

The upstream arrangement of headers fixes this.

Tested on 32/64 bit to check the pointer is correct.

This is a replacement of patches;
upstream for stable 2/8 staging: vt6656: 64 bit- Correctly address void structure.
upstream for stable 3/8 staging: vt6656: 64bit fixes: dpc.c incorrect addressing of void structure.

Cc stable@vger.kernel.org # 2.6.35+
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
---
 drivers/staging/vt6656/key.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Malcolm Priestley - Dec. 30, 2012, 5:04 p.m.
On Sun, 2012-12-30 at 10:27 -0500, Ben Collins wrote:
> On Dec 29, 2012, at 6:50 PM, Ben Hutchings <ben@decadent.org.uk> wrote:
> 
> > On Sat, 2012-12-29 at 13:10 +0000, Malcolm Priestley wrote:
> >> shorted back-ported version of upstream commit
> >> 11d404cb56ecd53bb23499897fbe7be1a9ac4827
> >> staging: vt6656: fix headers and add cfg80211.
> >> key.c only
> >> 
> >> This patch fixes the deadlock of 64 bit systems
> >> on successful association.
> >> 
> >> In key.h void pointer pvKeyTable in SKeyItem is out of alignment
> >> on 64 bit kernel.
> >> 
> >> The upstream arrangement of headers fixes this.
> > [...]
> > 
> > Please explain how.  I don't see anything weird about key.h and mac.h
> > that would cause structure definitions to be interpreted differently
> > depending on inclusion order.
> 
> Also, I would argue that such a dependency is a bug in itself. If such a dependency does exist, it needs to be either resolved so it's not possible for this to happen as described, or it needs a compile-time check to error out if the includes are not done in the proper order.
> 
I agree, but that is a matter for upstream.

This device is usually built-in to desktops/laptops.

The situation we have at the moment with 64 bit CD.

1) The machine hangs on boot.
2) Now to hangs on connection to a wifi point.

There is nothing that annoys or ticks off users more.

After rechecking everything this morning, this patch is the final fix
for down stream.

Regards


Malcolm










> --
> Servergy  : http://www.servergy.com/
> SwissDisk : http://www.swissdisk.com/
> Ubuntu    : http://www.ubuntu.com/
> My Blog   : http://ben-collins.blogspot.com/
>

Patch

diff --git a/drivers/staging/vt6656/key.c b/drivers/staging/vt6656/key.c
index a61fcb9..ea29bda 100644
--- a/drivers/staging/vt6656/key.c
+++ b/drivers/staging/vt6656/key.c
@@ -36,9 +36,9 @@ 
  *
  */
 
+#include "mac.h"
 #include "tmacro.h"
 #include "key.h"
-#include "mac.h"
 #include "rndis.h"
 #include "control.h"