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

Malcolm Priestley tvboxspy at gmail.com
Sun Dec 30 15:01:22 UTC 2012


On Sun, 2012-12-30 at 00:50 +0100, Ben Hutchings 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.


The difference is that key.h is no longer defined in key.c.

It is declared in path;
mac.h
----->device.h
-------------->key.h

The structure is now as seen by rxtx.c and dpc.c.

Before the patch, key.c has it's own localised version
declared in key.h and for some reason(?) is not packed the same.

See below.

Regards


Malcolm

Before patch;

64 bit kernel
key.c : KeyvInitTable
[ 3182.522842] KeyTable[0].pvKeyTable ffff880032e3d529
[ 3182.522846] KeyTable[0].bSoftWEP  ffff880032e3d6a5
[ 3182.522848] KeyTable[0].bSoftWEP(pvKeyTable +) : 380 <-----------!


rxtx.c : s_bPacketToWirelessUsb
[ 3187.008050] pTransmitKey->pvKeyTable ffff880032e3d529
[ 3187.008057] (pTransmitKey->pvKeyTable))->bSoftWEP(pvKeyTable +) : 358


After patch;

64 bit kernel
key.c : KeyvInitTable
[ 2615.745247] KeyTable[0].pvKeyTable ffff880032e3d529
[ 2615.745252] KeyTable[0].bSoftWEP  ffff880032e3d68f
[ 2615.745255] KeyTable[0].bSoftWEP(pvKeyTable +) : 358

rxtx.c : s_bPacketToWirelessUsb
[ 2618.864048] pTransmitKey->pvKeyTable ffff880032e3d529
[ 2618.864056] (pTransmitKey->pvKeyTable))->bSoftWEP(pvKeyTable +) : 358

32 bit kernel
key.c : KeyvInitTable
[  703.129323] KeyTable[0].pvKeyTable f177bd5f
[  703.129326] KeyTable[0].bSoftWEP  f177beb1
[  703.129328] KeyTable[0].bSoftWEP(pvKeyTable +) : 338
...
rxtx.c : s_bPacketToWirelessUsb
[  709.025622] pTransmitKey->pvKeyTable f177bd5f
[  709.025629] (pTransmitKey->pvKeyTable))->bSoftWEP(pvKeyTable +) : 338








More information about the kernel-team mailing list