android_kernel_oneplus_msm8998/drivers/net
Gustavo A. R. Silva 5e75d5e2cd cxgb3/l2t: Fix undefined behaviour
[ Upstream commit 76497732932f15e7323dc805e8ea8dc11bb587cf ]

The use of zero-sized array causes undefined behaviour when it is not
the last member in a structure. As it happens to be in this case.

Also, the current code makes use of a language extension to the C90
standard, but the preferred mechanism to declare variable-length
types such as this one is a flexible array member, introduced in
C99:

struct foo {
        int stuff;
        struct boo array[];
};

By making use of the mechanism above, we will get a compiler warning
in case the flexible array does not occur last. Which is beneficial
to cultivate a high-quality code.

Fixes: e48f129c2f ("[SCSI] cxgb3i: convert cdev->l2opt to use rcu to prevent NULL dereference")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-06-11 12:24:04 +02:00
..
appletalk net/appletalk: fix minor pointer leak to userspace in SIOCFINDIPDDPRT 2018-09-29 03:08:52 -07:00
arcnet
bonding bonding: fix arp_validate toggling in active-backup mode 2019-05-16 19:45:18 +02:00
caif
can can: dev: __can_get_echo_skb(): fix bogous check for non-existing skb by removing it 2019-02-06 19:43:04 +01:00
cris
dsa net: dsa: mv88e6xxx: Fix u64 statistics 2019-03-23 08:44:23 +01:00
ethernet cxgb3/l2t: Fix undefined behaviour 2019-06-11 12:24:04 +02:00
fddi
fjes
hamradio net: hamradio: use eth_broadcast_addr 2018-08-24 13:26:55 +02:00
hippi
hyperv
ieee802154 ieee802154: fakelb: switch from BUG_ON() to WARN_ON() on problem 2018-08-24 13:26:58 +02:00
ipvlan ipvlan: disallow userns cap_net_admin to change global mode/flags 2019-03-23 08:44:31 +01:00
irda irda: fix overly long udelay() 2018-06-06 16:46:21 +02:00
phy mdio_bus: Fix use-after-free on device_register fails 2019-03-23 08:44:30 +01:00
plip
ppp ppp: deflate: Fix possible crash in deflate_init 2019-06-11 12:23:43 +02:00
slip slip: make slhc_free() silently accept an error pointer 2019-05-16 19:44:51 +02:00
team team: fix possible recursive locking when add slaves 2019-05-16 19:44:52 +02:00
usb usbnet: ipheth: fix potential null pointer dereference in ipheth_carrier_set 2019-05-16 19:44:56 +02:00
vmxnet3
wan drivers: net: lmc: fix case value for target abort error 2018-09-05 09:18:36 +02:00
wimax
wireless brcmfmac: fix race during disconnect when USB completion is in progress 2019-06-11 12:24:02 +02:00
xen-netback xen-netback: fix occasional leak of grant ref mappings under memory pressure 2019-03-23 08:44:22 +01:00
dummy.c
eql.c
geneve.c
ifb.c
Kconfig
LICENSE.SRC
loopback.c
macvlan.c
macvtap.c
Makefile
mdio.c
mii.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c rapidio/rionet: do not free skb before reading its length 2018-12-13 09:21:26 +01:00
sb1000.c
Space.c
sungem_phy.c
tun.c tun: forbid iface creation with rtnl ops 2018-12-17 21:55:09 +01:00
veth.c
virtio_net.c virtio-net: Fix operstate for virtio when no VIRTIO_NET_F_STATUS 2018-05-30 07:49:11 +02:00
vrf.c vrf: Fix use after free and double free in vrf_finish_output 2018-04-13 19:50:27 +02:00
vxlan.c vxlan: Don't call gro_cells_destroy() before device is unregistered 2019-04-03 06:23:25 +02:00
xen-netfront.c xen/netfront: tolerate frags with no data 2019-01-13 10:05:28 +01:00