[ 3.5.y.z extended stable ] Patch "rtlwifi: Align private space in rtl_priv struct" has been added to staging queue

Luis Henriques luis.henriques at canonical.com
Fri Oct 11 10:24:38 UTC 2013


This is a note to let you know that I have just added a patch titled

    rtlwifi: Align private space in rtl_priv struct

to the linux-3.5.y-queue branch of the 3.5.y.z extended stable tree 
which can be found at:

 http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.5.y-queue

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.5.y.z tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Luis

------

>From c252cdb0303fa8082239fa6ed945d1ed471204f2 Mon Sep 17 00:00:00 2001
From: Larry Finger <Larry.Finger at lwfinger.net>
Date: Wed, 18 Sep 2013 21:21:35 -0500
Subject: [PATCH] rtlwifi: Align private space in rtl_priv struct

commit 60ce314d1750fef843e9db70050e09e49f838b69 upstream.

The private array at the end of the rtl_priv struct is not aligned.
On ARM architecture, this causes an alignment trap and is fixed by aligning
that array with __align(sizeof(void *)). That should properly align that
space according to the requirements of all architectures.

Reported-by: Jason Andrews <jasona at cadence.com>
Tested-by: Jason Andrews <jasona at cadence.com>
Signed-off-by: Larry Finger <Larry.Finger at lwfinger.net>
Signed-off-by: John W. Linville <linville at tuxdriver.com>
Signed-off-by: Luis Henriques <luis.henriques at canonical.com>
---
 drivers/net/wireless/rtlwifi/wifi.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/rtlwifi/wifi.h b/drivers/net/wireless/rtlwifi/wifi.h
index cdaa21f..dec7c55 100644
--- a/drivers/net/wireless/rtlwifi/wifi.h
+++ b/drivers/net/wireless/rtlwifi/wifi.h
@@ -1701,7 +1701,7 @@ struct rtl_priv {
 	   that it points to the data allocated
 	   beyond  this structure like:
 	   rtl_pci_priv or rtl_usb_priv */
-	u8 priv[0];
+	u8 priv[0] __aligned(sizeof(void *));
 };

 #define rtl_priv(hw)		(((struct rtl_priv *)(hw)->priv))
--
1.8.3.2





More information about the kernel-team mailing list