]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/3.10.16/rtlwifi-align-private-space-in-rtl_priv-struct.patch
Linux 4.14.95
[thirdparty/kernel/stable-queue.git] / releases / 3.10.16 / rtlwifi-align-private-space-in-rtl_priv-struct.patch
1 From 60ce314d1750fef843e9db70050e09e49f838b69 Mon Sep 17 00:00:00 2001
2 From: Larry Finger <Larry.Finger@lwfinger.net>
3 Date: Wed, 18 Sep 2013 21:21:35 -0500
4 Subject: rtlwifi: Align private space in rtl_priv struct
5
6 From: Larry Finger <Larry.Finger@lwfinger.net>
7
8 commit 60ce314d1750fef843e9db70050e09e49f838b69 upstream.
9
10 The private array at the end of the rtl_priv struct is not aligned.
11 On ARM architecture, this causes an alignment trap and is fixed by aligning
12 that array with __align(sizeof(void *)). That should properly align that
13 space according to the requirements of all architectures.
14
15 Reported-by: Jason Andrews <jasona@cadence.com>
16 Tested-by: Jason Andrews <jasona@cadence.com>
17 Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
18 Signed-off-by: John W. Linville <linville@tuxdriver.com>
19 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20
21 ---
22 drivers/net/wireless/rtlwifi/wifi.h | 2 +-
23 1 file changed, 1 insertion(+), 1 deletion(-)
24
25 --- a/drivers/net/wireless/rtlwifi/wifi.h
26 +++ b/drivers/net/wireless/rtlwifi/wifi.h
27 @@ -2057,7 +2057,7 @@ struct rtl_priv {
28 that it points to the data allocated
29 beyond this structure like:
30 rtl_pci_priv or rtl_usb_priv */
31 - u8 priv[0];
32 + u8 priv[0] __aligned(sizeof(void *));
33 };
34
35 #define rtl_priv(hw) (((struct rtl_priv *)(hw)->priv))