linux/drivers/net
Shung-Hsi Yu cbedcb044e net: ethernet: mlx4: Fix memory allocation in mlx4_buddy_init()
On machines with much memory (> 2 TByte) and log_mtts_per_seg == 0, a
max_order of 31 will be passed to mlx_buddy_init(), which results in
s = BITS_TO_LONGS(1 << 31) becoming a negative value, leading to
kvmalloc_array() failure when it is converted to size_t.

  mlx4_core 0000:b1:00.0: Failed to initialize memory region table, aborting
  mlx4_core: probe of 0000:b1:00.0 failed with error -12

Fix this issue by changing the left shifting operand from a signed literal to
an unsigned one.

Fixes: 225c7b1fee ("IB/mlx4: Add a driver Mellanox ConnectX InfiniBand adapters")
Signed-off-by: Shung-Hsi Yu <shung-hsi.yu@suse.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-09-01 13:13:15 -07:00
..
appletalk
arcnet
bonding bonding: fix active-backup failover for current ARP slave 2020-08-18 15:57:47 -07:00
caif
can
dsa net: dsa: mt7530: fix advertising unsupported 1000baseT_Half 2020-08-28 06:54:06 -07:00
ethernet net: ethernet: mlx4: Fix memory allocation in mlx4_buddy_init() 2020-09-01 13:13:15 -07:00
fddi net: fddi: skfp: cfm: Remove seemingly unused variable 'ID_sccs' 2020-08-14 20:42:25 -07:00
fjes
hamradio
hippi
hyperv hv_netvsc: Fix the queue_mapping in netvsc_vf_xmit() 2020-08-20 16:24:00 -07:00
ieee802154
ipa remoteproc updates for v5.9 2020-08-11 11:17:45 -07:00
ipvlan ipvlan: fix device features 2020-08-16 15:15:00 -07:00
netdevsim Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next 2020-08-03 18:27:40 -07:00
phy net: dp83869: Fix RGMII internal delay configuration 2020-08-26 07:13:28 -07:00
plip
ppp mm, treewide: rename kzfree() to kfree_sensitive() 2020-08-07 11:33:22 -07:00
slip
team
usb net: usb: Fix uninit-was-stored issue in asix_read_phy_addr() 2020-08-27 07:37:19 -07:00
vmxnet3 vmxnet3: use correct tcp hdr length when packet is encapsulated 2020-08-10 12:09:38 -07:00
wan drivers/net/wan/hdlc_cisco: Add hard_header_len 2020-08-31 12:22:43 -07:00
wimax
wireguard mm, treewide: rename kzfree() to kfree_sensitive() 2020-08-07 11:33:22 -07:00
wireless rtl818x: constify ioreadX() iomem argument (as in generic implementation) 2020-08-14 19:56:57 -07:00
xen-netback
bareudp.c tunnels: PMTU discovery support for directly bridged IP packets 2020-08-04 13:01:45 -07:00
dummy.c
eql.c
geneve.c geneve: Support for PMTU discovery on directly bridged links 2020-08-04 13:01:45 -07:00
gtp.c gtp: add GTPA_LINK info to msg sent to userspace 2020-08-25 06:28:53 -07:00
ifb.c
Kconfig
LICENSE.SRC
loopback.c
macsec.c
macvlan.c macvlan: validate setting of multiple remote source MAC addresses 2020-08-18 12:33:43 -07:00
macvtap.c
Makefile
mdio.c
mii.c
net_failover.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
Space.c
sungem_phy.c
tap.c
thunderbolt.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next 2020-08-05 20:13:21 -07:00
tun.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next 2020-08-03 18:27:40 -07:00
veth.c bpf, xdp: Remove XDP_QUERY_PROG and XDP_QUERY_PROG_HW XDP commands 2020-07-25 20:37:02 -07:00
virtio_net.c virtio: fixes, features 2020-08-11 14:34:17 -07:00
vrf.c vrf: Handle CONFIG_SYSCTL not set 2020-07-23 17:51:04 -07:00
vsockmon.c
vxlan.c Revert "vxlan: fix tos value before xmit" 2020-08-05 12:09:10 -07:00
xen-netfront.c bpf, xdp: Remove XDP_QUERY_PROG and XDP_QUERY_PROG_HW XDP commands 2020-07-25 20:37:02 -07:00