1
0
Fork 0
alistair23-linux/drivers/net/ethernet
Subash Abhinov Kasiviswanathan d02854dc19 net: qualcomm: rmnet: Fix incorrect assignment of real_dev
A null dereference was observed when a sysctl was being set
from userspace and rmnet was stuck trying to complete some actions
in the NETDEV_REGISTER callback. This is because the real_dev is set
only after the device registration handler completes.

sysctl call stack -

<6> Unable to handle kernel NULL pointer dereference at
    virtual address 00000108
<2> pc : rmnet_vnd_get_iflink+0x1c/0x28
<2> lr : dev_get_iflink+0x2c/0x40
<2>  rmnet_vnd_get_iflink+0x1c/0x28
<2>  inet6_fill_ifinfo+0x15c/0x234
<2>  inet6_ifinfo_notify+0x68/0xd4
<2>  ndisc_ifinfo_sysctl_change+0x1b8/0x234
<2>  proc_sys_call_handler+0xac/0x100
<2>  proc_sys_write+0x3c/0x4c
<2>  __vfs_write+0x54/0x14c
<2>  vfs_write+0xcc/0x188
<2>  SyS_write+0x60/0xc0
<2>  el0_svc_naked+0x34/0x38

device register call stack -

<2>  notifier_call_chain+0x84/0xbc
<2>  raw_notifier_call_chain+0x38/0x48
<2>  call_netdevice_notifiers_info+0x40/0x70
<2>  call_netdevice_notifiers+0x38/0x60
<2>  register_netdevice+0x29c/0x3d8
<2>  rmnet_vnd_newlink+0x68/0xe8
<2>  rmnet_newlink+0xa0/0x160
<2>  rtnl_newlink+0x57c/0x6c8
<2>  rtnetlink_rcv_msg+0x1dc/0x328
<2>  netlink_rcv_skb+0xac/0x118
<2>  rtnetlink_rcv+0x24/0x30
<2>  netlink_unicast+0x158/0x1f0
<2>  netlink_sendmsg+0x32c/0x338
<2>  sock_sendmsg+0x44/0x60
<2>  SyS_sendto+0x150/0x1ac
<2>  el0_svc_naked+0x34/0x38

Fixes: b752eff5be ("net: qualcomm: rmnet: Implement ndo_get_iflink")
Signed-off-by: Sean Tranchetti <stranche@codeaurora.org>
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-09 19:45:48 -08:00
..
3com
8390 net: ethernet: Use phy_set_max_speed() to limit advertised speed 2018-09-12 20:24:20 -07:00
adaptec
aeroflex net: ethernet: Use phy_set_max_speed() to limit advertised speed 2018-09-12 20:24:20 -07:00
agere net: ethernet: Use phy_set_max_speed() to limit advertised speed 2018-09-12 20:24:20 -07:00
alacritech net: ethernet: slicoss: remove duplicated include from slic.h 2018-09-18 19:57:40 -07:00
allwinner net: ethernet: Use phy_set_max_speed() to limit advertised speed 2018-09-12 20:24:20 -07:00
alteon alteon: acenic: mark expected switch fall-through 2018-08-07 17:54:19 -07:00
altera net: ethernet: Use phy_set_max_speed() to limit advertised speed 2018-09-12 20:24:20 -07:00
amazon net: ena: fix compilation error in xtensa architecture 2018-10-22 19:48:04 -07:00
amd drivers: net: remove <net/busy_poll.h> inclusion when not needed 2018-10-25 16:20:02 -07:00
apm net: ethernet: Add helper to determine if pause configuration is supported 2018-09-12 20:24:21 -07:00
apple net: apple: fix return type of ndo_start_xmit function 2018-09-21 19:15:15 -07:00
aquantia net: aquantia: allow rx checksum offload configuration 2018-11-09 15:38:10 -08:00
arc
atheros net: alx: make alx_drv_name static 2018-11-05 17:12:58 -08:00
aurora net: ethernet: Add helper for set_pauseparam for Asym Pause 2018-09-12 20:24:21 -07:00
broadcom net: systemport: Protect stop from timeout 2018-11-03 00:03:40 -07:00
brocade bna: Remove unnecessary self assignment 2018-09-21 19:02:05 -07:00
cadence net: ethernet: cadence: fix socket buffer corruption problem 2018-10-25 11:32:24 -07:00
calxeda
cavium mlx5-updates-2018-10-03 2018-10-04 09:48:37 -07:00
chelsio Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2018-10-25 16:43:35 -07:00
cirrus net: cirrus: fix return type of ndo_start_xmit function 2018-09-21 19:15:14 -07:00
cisco
cortina net: ethernet: Add helper for MACs which support asym pause 2018-09-12 20:24:21 -07:00
davicom net: ethernet: davicom: dm9000: simplify getting .driver_data 2018-10-21 21:10:12 -07:00
dec net: tulip: de4x5: mark expected switch fall-throughs 2018-08-07 17:54:19 -07:00
dlink
emulex pci-v4.20-changes 2018-10-25 06:50:48 -07:00
ezchip
faraday net: faraday: fix return type of ndo_start_xmit function 2018-09-26 10:18:08 -07:00
freescale Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-10-19 11:03:06 -07:00
fujitsu
hisilicon net: hns3: bugfix for not checking return value 2018-11-08 16:23:49 -08:00
hp net: hp100: fix always-true check for link up state 2018-09-17 07:55:19 -07:00
huawei hinic: Fix l4_type parameter in hinic_task_set_tunnel_l4 2018-10-29 20:43:40 -07:00
i825xx net: i825xx: fix return type of ndo_start_xmit function 2018-09-21 19:15:15 -07:00
ibm ibmvnic: fix accelerated VLAN handling 2018-11-07 22:36:21 -08:00
intel i40e: enable NETIF_F_NTUPLE and NETIF_F_HW_TC at driver load 2018-11-07 10:32:15 -08:00
marvell net: mvpp2: Fix affinity hint allocation 2018-10-30 11:34:41 -07:00
mediatek net: phy: Add helper for advertise to lcl value 2018-10-01 22:55:36 -07:00
mellanox mlxsw: spectrum: Fix IP2ME CPU policer configuration 2018-11-03 19:31:42 -07:00
micrel net: micrel: fix return type of ndo_start_xmit function 2018-09-21 19:11:39 -07:00
microchip lan743x: Remove SPI dependency from Microchip group. 2018-10-25 16:20:48 -07:00
moxa
mscc Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-10-19 11:03:06 -07:00
myricom drivers: net: remove <net/busy_poll.h> inclusion when not needed 2018-10-25 16:20:02 -07:00
natsemi
neterion net: neterion: vxge: Remove unnecessary parentheses 2018-09-21 19:00:09 -07:00
netronome Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next 2018-10-21 21:11:46 -07:00
ni net: nixge: Address compiler warnings when building for i386 2018-10-01 22:48:08 -07:00
nuvoton
nvidia
nxp net: ethernet: lpc_eth: add device and device node local variables 2018-10-19 17:04:38 -07:00
oki-semi
packetengines
pasemi
qlogic qed: Fix potential memory corruption 2018-11-08 19:38:19 -08:00
qualcomm net: qualcomm: rmnet: Fix incorrect assignment of real_dev 2018-11-09 19:45:48 -08:00
rdc net: ethernet: Use phy_set_max_speed() to limit advertised speed 2018-09-12 20:24:20 -07:00
realtek r8169: fix broken Wake-on-LAN from S5 (poweroff) 2018-10-25 16:15:23 -07:00
renesas Merge ra.kernel.org:/pub/scm/linux/kernel/git/davem/net 2018-09-25 10:35:29 -07:00
rocker rocker: Drop pointless static qualifier 2018-10-19 10:42:19 -07:00
samsung net: ethernet: Use phy_set_max_speed() to limit advertised speed 2018-09-12 20:24:20 -07:00
seeq net: seeq: fix return type of ndo_start_xmit function 2018-09-21 19:15:14 -07:00
sfc pci-v4.20-changes 2018-10-25 06:50:48 -07:00
sgi net: sgi: fix return type of ndo_start_xmit function 2018-09-21 19:15:14 -07:00
silan
sis
smsc net: ethernet: smsc: smc91x: simplify getting .driver_data 2018-10-21 21:10:12 -07:00
socionext net: socionext: Reset tx queue in ndo_stop 2018-10-23 10:55:35 -07:00
stmicro net: stmmac: Fix RX packet size > 8191 2018-11-08 19:47:44 -08:00
sun net: sun: fix return type of ndo_start_xmit function 2018-09-19 21:17:58 -07:00
synopsys
tehuti
ti net: ethernet: ti: cpsw: unsync mcast entries while switch promisc mode 2018-10-22 20:20:14 -07:00
toshiba net: toshiba: remove a redundant local variable 'index_specified' 2018-09-19 23:08:36 -07:00
tundra
via
wiznet net: ethernet: wiznet: w5300: simplify getting .driver_data 2018-10-21 21:10:12 -07:00
xilinx net: xilinx: fix return type of ndo_start_xmit function 2018-09-19 21:17:58 -07:00
xircom
xscale
Kconfig net: lantiq: Add Lantiq / Intel VRX200 Ethernet driver 2018-09-13 08:14:33 -07:00
Makefile net: lantiq: Add Lantiq / Intel VRX200 Ethernet driver 2018-09-13 08:14:33 -07:00
dnet.c net: ethernet: Add helper for MACs which support asym pause 2018-09-12 20:24:21 -07:00
dnet.h
ec_bhf.c
ethoc.c net: ethernet: Use phy_set_max_speed() to limit advertised speed 2018-09-12 20:24:20 -07:00
fealnx.c
jme.c
jme.h
korina.c
lantiq_etop.c MIPS: lantiq: Do not enable IRQs in dma open 2018-09-13 08:14:33 -07:00
lantiq_xrx200.c net: lantiq: lantiq_xrx200: Move clock prepare to probe function 2018-09-17 08:12:11 -07:00
netx-eth.c