Commit d50729f
net: usb: smsc95xx: stop lying about skb->truesize
Some usb drivers try to set small skb->truesize and break
core networking stacks.
In this patch, I removed one of the skb->truesize override.
I also replaced one skb_clone() by an allocation of a fresh
and small skb, to get minimally sized skbs, like we did
in commit 1e2c611 ("net: cdc_ncm: reduce skb truesize
in rx path") and 4ce62d5 ("net: usb: ax88179_178a:
stop lying about skb->truesize")
v3: also fix a sparse error ( https://lore.kernel.org/oe-kbuild-all/202405091310.KvncIecx-lkp@intel.com/ )
v2: leave the skb_trim() game because smsc95xx_rx_csum_offload()
needs the csum part. (Jakub)
While we are it, use get_unaligned() in smsc95xx_rx_csum_offload().
Fixes: 2f7ca80 ("net: Add SMSC LAN9500 USB2.0 10/100 ethernet adapter driver")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Steve Glendinning <steve.glendinning@shawell.net>
Cc: UNGLinuxDriver@microchip.com
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://lore.kernel.org/r/20240509083313.2113832-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>1 parent 089507a commit d50729f
1 file changed
Lines changed: 7 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1810 | 1810 | | |
1811 | 1811 | | |
1812 | 1812 | | |
1813 | | - | |
| 1813 | + | |
| 1814 | + | |
| 1815 | + | |
1814 | 1816 | | |
1815 | | - | |
| 1817 | + | |
1816 | 1818 | | |
1817 | 1819 | | |
1818 | 1820 | | |
| |||
1870 | 1872 | | |
1871 | 1873 | | |
1872 | 1874 | | |
1873 | | - | |
1874 | 1875 | | |
1875 | 1876 | | |
1876 | 1877 | | |
1877 | 1878 | | |
1878 | | - | |
| 1879 | + | |
1879 | 1880 | | |
1880 | 1881 | | |
1881 | 1882 | | |
1882 | 1883 | | |
1883 | 1884 | | |
1884 | | - | |
1885 | | - | |
1886 | | - | |
| 1885 | + | |
| 1886 | + | |
1887 | 1887 | | |
1888 | 1888 | | |
1889 | 1889 | | |
1890 | 1890 | | |
1891 | | - | |
1892 | 1891 | | |
1893 | 1892 | | |
1894 | 1893 | | |
| |||
0 commit comments