OpenCloudOS-Kernel/drivers/net/ethernet
Vadim Lomovtsev 469998c861 net: thunderx: prevent concurrent data re-writing by nicvf_set_rx_mode
For each network interface linux network stack issue ndo_set_rx_mode call
in order to configure MAC address filters (e.g. for multicast filtering).
Currently ThunderX NICVF driver has only one ordered workqueue to process
such requests for all VFs.

And because of that it is possible that subsequent call to
ndo_set_rx_mode would corrupt data which is currently in use
by nicvf_set_rx_mode_task. Which in turn could cause following issue:
[...]
[   48.978341] Unable to handle kernel paging request at virtual address 1fffff0000000000
[   48.986275] Mem abort info:
[   48.989058]   Exception class = DABT (current EL), IL = 32 bits
[   48.994965]   SET = 0, FnV = 0
[   48.998020]   EA = 0, S1PTW = 0
[   49.001152] Data abort info:
[   49.004022]   ISV = 0, ISS = 0x00000004
[   49.007869]   CM = 0, WnR = 0
[   49.010826] [1fffff0000000000] address between user and kernel address ranges
[   49.017963] Internal error: Oops: 96000004 [#1] SMP
[...]
[   49.072138] task: ffff800fdd675400 task.stack: ffff000026440000
[   49.078051] PC is at prefetch_freepointer.isra.37+0x28/0x3c
[   49.083613] LR is at kmem_cache_alloc_trace+0xc8/0x1fc
[...]
[   49.272684] [<ffff0000082738f0>] prefetch_freepointer.isra.37+0x28/0x3c
[   49.279286] [<ffff000008276bc8>] kmem_cache_alloc_trace+0xc8/0x1fc
[   49.285455] [<ffff0000082c0c0c>] alloc_fdtable+0x78/0x134
[   49.290841] [<ffff0000082c15c0>] dup_fd+0x254/0x2f4
[   49.295709] [<ffff0000080d1954>] copy_process.isra.38.part.39+0x64c/0x1168
[   49.302572] [<ffff0000080d264c>] _do_fork+0xfc/0x3b0
[   49.307524] [<ffff0000080d29e8>] SyS_clone+0x44/0x50
[...]

This patch is to prevent such concurrent data write with spinlock.

Reported-by: Dean Nelson <dnelson@redhat.com>
Signed-off-by: Vadim Lomovtsev <Vadim.Lomovtsev@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-06-12 15:25:27 -07:00
..
3com Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-05-21 16:01:54 -04:00
8390 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-05-21 16:01:54 -04:00
adaptec
aeroflex
agere
alacritech
allwinner
alteon
altera ethernet: Use octal not symbolic permissions 2018-03-26 12:07:49 -04:00
amazon net: ena: Use pci_sriov_configure_simple() to enable VFs 2018-04-24 16:47:22 -05:00
amd Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-05-26 19:46:15 -04:00
apm
apple
aquantia net: aquantia: fix unsigned numvecs comparison with less than zero 2018-06-08 18:45:52 -04:00
arc
atheros
aurora
broadcom pci-v4.18-changes 2018-06-07 12:45:58 -07:00
brocade ethernet: Use octal not symbolic permissions 2018-03-26 12:07:49 -04:00
cadence drivers: net: Remove device_node checks with of_mdiobus_register() 2018-05-16 14:20:36 -04:00
calxeda
cavium net: thunderx: prevent concurrent data re-writing by nicvf_set_rx_mode 2018-06-12 15:25:27 -07:00
chelsio pci-v4.18-changes 2018-06-07 12:45:58 -07:00
cirrus
cisco enic: fix UDP rss bits 2018-06-06 09:09:09 -04:00
cortina net: gemini: fix spelling mistake: "it" -> "is" 2018-06-04 17:05:39 -04:00
davicom treewide: simplify Kconfig dependencies for removed archs 2018-03-26 15:55:57 +02:00
dec
dlink
emulex be2net: Fix error detection logic for BE3 2018-05-29 10:57:25 -04:00
ezchip
faraday
freescale net: ethernet: freescale: fix false-positive string overflow warning 2018-05-30 13:16:44 -04:00
fujitsu
hisilicon net: hns3: Optimize PF CMDQ interrupt switching process 2018-06-06 14:02:48 -04:00
hp
huawei net-next/hinic: add pci device ids for 25ge and 100ge card 2018-05-08 00:07:42 -04:00
i825xx
ibm Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-05-26 19:46:15 -04:00
intel ixgbe: Fix bit definitions and add support for testing for ipsec support 2018-06-11 08:50:51 -07:00
marvell net: mvpp2: mvpp2_percpu_read_relaxed() can be static 2018-06-04 11:36:29 -04:00
mediatek net: mediatek: use of_device_get_match_data() 2018-04-16 13:43:07 -04:00
mellanox 4.18 Merge window pull request 2018-06-07 13:04:07 -07:00
micrel
microchip
moxa
mscc net: mscc: ocelot: Fix uninitialized error in ocelot_netdevice_event() 2018-06-07 16:54:39 -04:00
myricom ethernet: Use octal not symbolic permissions 2018-03-26 12:07:49 -04:00
natsemi net/sonic: Use dma_mapping_error() 2018-05-31 14:17:33 -04:00
neterion net: vxge: fix spelling mistake in macro VXGE_HW_ERR_PRIVILAGED_OPEARATION 2018-05-23 14:50:02 -04:00
netronome nfp: flower: free dst_entry in route table 2018-06-12 15:18:28 -07:00
ni net: nixge: Address compiler warnings about signedness 2018-05-07 23:30:03 -04:00
nuvoton
nvidia
nxp
oki-semi
packetengines
pasemi
qlogic qed*: Utilize FW 8.37.2.0 2018-06-05 10:48:09 -04:00
qualcomm net: qualcomm: rmnet: Fix use after free while sending command ack 2018-06-05 10:17:05 -04:00
rdc
realtek 8139too: Remove unnecessary netif_napi_del() 2018-05-25 16:35:45 -04:00
renesas sh_eth: use DIV_ROUND_UP() in sh_eth_soft_swap() 2018-06-04 15:23:25 -04:00
rocker rocker: rocker_main: Ignore bridge VLAN events 2018-05-31 14:13:43 -04:00
samsung ethernet: Use octal not symbolic permissions 2018-03-26 12:07:49 -04:00
seeq
sfc Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2018-06-06 18:39:49 -07:00
sgi
silan
sis
smsc arch: remove obsolete architecture ports 2018-04-02 20:20:12 -07:00
socionext Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-06-03 09:31:58 -04:00
stmicro net: stmmac: fix build failure due to missing COMMON_CLK dependency 2018-06-08 10:59:08 -04:00
sun net: ethernet: sun: niu set correct packet size in skb 2018-05-04 13:20:46 -04:00
synopsys
tehuti
ti net: netcp: ethss: remove unnecessary pointer set to NULL 2018-06-03 10:39:48 -04:00
toshiba
tundra
via
wiznet
xilinx net: axienet: remove stale comment of axienet_open 2018-06-03 10:59:32 -04:00
xircom
xscale
Kconfig net: ethernet: Sort Kconfig sourcing alphabetically 2018-05-21 12:14:47 -04:00
Makefile net: mscc: Add initial Ocelot switch support 2018-05-15 16:41:15 -04:00
dnet.c
dnet.h
ec_bhf.c ethernet: Use octal not symbolic permissions 2018-03-26 12:07:49 -04:00
ethoc.c net: ethoc: Remove useless test before clk_disable_unprepare 2018-05-16 14:44:29 -04:00
fealnx.c
jme.c
jme.h
korina.c
lantiq_etop.c
netx-eth.c