]> git.baikalelectronics.ru Git - kernel.git/commit
staging: vt6656: Fix inconsistent structure packing
authorBen Hutchings <ben@decadent.org.uk>
Mon, 14 Jan 2013 01:29:17 +0000 (01:29 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Jan 2013 21:08:32 +0000 (13:08 -0800)
commita9beeb66d896084b4122d5b6db5c494c67b60d38
tree7d1d6688d96c6c0b12699a24e8ffce843cfb09db
parentf3d1e0bfcb81ba1da0f0deb48a221e6051736b03
staging: vt6656: Fix inconsistent structure packing

vt6656 has several headers that use the #pragma pack(1) directive to
enable structure packing, but never disable it.  The layout of
structures defined in other headers can then depend on which order the
various headers are included in, breaking the One Definition Rule.

In practice this resulted in crashes on x86_64 until the order of header
inclusion was changed for some files in commit 7ec6712bb1ef6 ('staging:
vt6656: fix headers and add cfg80211.').  But we need a proper fix that
won't be affected by future changes to the order of inclusion.

This removes the #pragma pack(1) directives and adds __packed to the
structure definitions for which packing appears to have been intended.

Reported-and-tested-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vt6656/bssdb.h
drivers/staging/vt6656/int.h
drivers/staging/vt6656/iocmd.h
drivers/staging/vt6656/iowpa.h