diff options
author | Tong Zhang <ztong0001@gmail.com> | 2021-02-14 18:43:08 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-02-15 12:36:27 -0800 |
commit | d0a0bbe7b0a181c58bd22d6942146cfa3ab9e49a (patch) | |
tree | ddcbbfc6090784341324c4cb60ba618360f95208 /drivers/atm/idt77252.h | |
parent | 57baf8cc70ea4cf5503c9d42f31f6a86d7f5ff1a (diff) | |
download | linux-d0a0bbe7b0a181c58bd22d6942146cfa3ab9e49a.tar.gz linux-d0a0bbe7b0a181c58bd22d6942146cfa3ab9e49a.tar.bz2 linux-d0a0bbe7b0a181c58bd22d6942146cfa3ab9e49a.zip |
atm: idt77252: fix build broken on amd64
idt77252 is broken and wont load on amd64 systems
modprobe idt77252 shows the following
idt77252_init: skb->cb is too small (48 < 56)
Add packed attribute to struct idt77252_skb_prv and struct atm_skb_data
so that the total size can be <= sizeof(skb->cb)
Also convert runtime size check to buildtime size check in
idt77252_init()
Signed-off-by: Tong Zhang <ztong0001@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/atm/idt77252.h')
-rw-r--r-- | drivers/atm/idt77252.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/atm/idt77252.h b/drivers/atm/idt77252.h index 9339197d701c..b059d31364dd 100644 --- a/drivers/atm/idt77252.h +++ b/drivers/atm/idt77252.h @@ -789,7 +789,7 @@ struct idt77252_skb_prv { struct scqe tbd; /* Transmit Buffer Descriptor */ dma_addr_t paddr; /* DMA handle */ u32 pool; /* sb_pool handle */ -}; +} __packed; #define IDT77252_PRV_TBD(skb) \ (((struct idt77252_skb_prv *)(ATM_SKB(skb)+1))->tbd) |