1. 25 11月, 2020 7 次提交
    • L
      ibmvnic: fix NULL pointer dereference in ibmvic_reset_crq · 0e435bef
      Lijun Pan 提交于
      crq->msgs could be NULL if the previous reset did not complete after
      freeing crq->msgs. Check for NULL before dereferencing them.
      
      Snippet of call trace:
      ...
      ibmvnic 30000003 env3 (unregistering): Releasing sub-CRQ
      ibmvnic 30000003 env3 (unregistering): Releasing CRQ
      BUG: Kernel NULL pointer dereference on read at 0x00000000
      Faulting instruction address: 0xc0000000000c1a30
      Oops: Kernel access of bad area, sig: 11 [#1]
      LE PAGE_SIZE=64K MMU=Hash SMP NR_CPUS=2048 NUMA pSeries
      Modules linked in: ibmvnic(E-) rpadlpar_io rpaphp xt_CHECKSUM xt_MASQUERADE xt_conntrack ipt_REJECT nf_reject_ipv4 nft_compat nft_counter nft_chain_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 nf_tables xsk_diag tcp_diag udp_diag tun raw_diag inet_diag unix_diag bridge af_packet_diag netlink_diag stp llc rfkill sunrpc pseries_rng xts vmx_crypto uio_pdrv_genirq uio binfmt_misc ip_tables xfs libcrc32c sd_mod t10_pi sg ibmvscsi ibmveth scsi_transport_srp dm_mirror dm_region_hash dm_log dm_mod [last unloaded: ibmvnic]
      CPU: 20 PID: 8426 Comm: kworker/20:0 Tainted: G            E     5.10.0-rc1+ #12
      Workqueue: events __ibmvnic_reset [ibmvnic]
      NIP:  c0000000000c1a30 LR: c008000001b00c18 CTR: 0000000000000400
      REGS: c00000000d05b7a0 TRAP: 0380   Tainted: G            E      (5.10.0-rc1+)
      MSR:  800000000280b033 <SF,VEC,VSX,EE,FP,ME,IR,DR,RI,LE>  CR: 44002480  XER: 20040000
      CFAR: c0000000000c19ec IRQMASK: 0
      GPR00: 0000000000000400 c00000000d05ba30 c008000001b17c00 0000000000000000
      GPR04: 0000000000000000 0000000000000000 0000000000000000 00000000000001e2
      GPR08: 000000000001f400 ffffffffffffd950 0000000000000000 c008000001b0b280
      GPR12: c0000000000c19c8 c00000001ec72e00 c00000000019a778 c00000002647b440
      GPR16: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
      GPR20: 0000000000000006 0000000000000001 0000000000000003 0000000000000002
      GPR24: 0000000000001000 c008000001b0d570 0000000000000005 c00000007ab5d550
      GPR28: c00000007ab5c000 c000000032fcf848 c00000007ab5cc00 c000000032fcf800
      NIP [c0000000000c1a30] memset+0x68/0x104
      LR [c008000001b00c18] ibmvnic_reset_crq+0x70/0x110 [ibmvnic]
      Call Trace:
      [c00000000d05ba30] [0000000000000800] 0x800 (unreliable)
      [c00000000d05bab0] [c008000001b0a930] do_reset.isra.40+0x224/0x634 [ibmvnic]
      [c00000000d05bb80] [c008000001b08574] __ibmvnic_reset+0x17c/0x3c0 [ibmvnic]
      [c00000000d05bc50] [c00000000018d9ac] process_one_work+0x2cc/0x800
      [c00000000d05bd20] [c00000000018df58] worker_thread+0x78/0x520
      [c00000000d05bdb0] [c00000000019a934] kthread+0x1c4/0x1d0
      [c00000000d05be20] [c00000000000d5d0] ret_from_kernel_thread+0x5c/0x6c
      
      Fixes: 032c5e82 ("Driver for IBM System i/p VNIC protocol")
      Signed-off-by: NLijun Pan <ljp@linux.ibm.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      0e435bef
    • L
      ibmvnic: fix NULL pointer dereference in reset_sub_crq_queues · a0faaa27
      Lijun Pan 提交于
      adapter->tx_scrq and adapter->rx_scrq could be NULL if the previous reset
      did not complete after freeing sub crqs. Check for NULL before
      dereferencing them.
      
      Snippet of call trace:
      ibmvnic 30000006 env6: Releasing sub-CRQ
      ibmvnic 30000006 env6: Releasing CRQ
      ...
      ibmvnic 30000006 env6: Got Control IP offload Response
      ibmvnic 30000006 env6: Re-setting tx_scrq[0]
      BUG: Kernel NULL pointer dereference on read at 0x00000000
      Faulting instruction address: 0xc008000003dea7cc
      Oops: Kernel access of bad area, sig: 11 [#1]
      LE PAGE_SIZE=64K MMU=Hash SMP NR_CPUS=2048 NUMA pSeries
      Modules linked in: rpadlpar_io rpaphp xt_CHECKSUM xt_MASQUERADE xt_conntrack ipt_REJECT nf_reject_ipv4 nft_compat nft_counter nft_chain_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 nf_tables xsk_diag tcp_diag udp_diag raw_diag inet_diag unix_diag af_packet_diag netlink_diag tun bridge stp llc rfkill sunrpc pseries_rng xts vmx_crypto uio_pdrv_genirq uio binfmt_misc ip_tables xfs libcrc32c sd_mod t10_pi sg ibmvscsi ibmvnic ibmveth scsi_transport_srp dm_mirror dm_region_hash dm_log dm_mod
      CPU: 80 PID: 1856 Comm: kworker/80:2 Tainted: G        W         5.8.0+ #4
      Workqueue: events __ibmvnic_reset [ibmvnic]
      NIP:  c008000003dea7cc LR: c008000003dea7bc CTR: 0000000000000000
      REGS: c0000007ef7db860 TRAP: 0380   Tainted: G        W          (5.8.0+)
      MSR:  800000000280b033 <SF,VEC,VSX,EE,FP,ME,IR,DR,RI,LE>  CR: 28002422  XER: 0000000d
      CFAR: c000000000bd9520 IRQMASK: 0
      GPR00: c008000003dea7bc c0000007ef7dbaf0 c008000003df7400 c0000007fa26ec00
      GPR04: c0000007fcd0d008 c0000007fcd96350 0000000000000027 c0000007fcd0d010
      GPR08: 0000000000000023 0000000000000000 0000000000000000 0000000000000000
      GPR12: 0000000000002000 c00000001ec18e00 c0000000001982f8 c0000007bad6e840
      GPR16: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
      GPR20: 0000000000000000 0000000000000000 0000000000000000 fffffffffffffef7
      GPR24: 0000000000000402 c0000007fa26f3a8 0000000000000003 c00000016f8ec048
      GPR28: 0000000000000000 0000000000000000 0000000000000000 c0000007fa26ec00
      NIP [c008000003dea7cc] ibmvnic_reset_init+0x15c/0x258 [ibmvnic]
      LR [c008000003dea7bc] ibmvnic_reset_init+0x14c/0x258 [ibmvnic]
      Call Trace:
      [c0000007ef7dbaf0] [c008000003dea7bc] ibmvnic_reset_init+0x14c/0x258 [ibmvnic] (unreliable)
      [c0000007ef7dbb80] [c008000003de8860] __ibmvnic_reset+0x408/0x970 [ibmvnic]
      [c0000007ef7dbc50] [c00000000018b7cc] process_one_work+0x2cc/0x800
      [c0000007ef7dbd20] [c00000000018bd78] worker_thread+0x78/0x520
      [c0000007ef7dbdb0] [c0000000001984c4] kthread+0x1d4/0x1e0
      [c0000007ef7dbe20] [c00000000000cea8] ret_from_kernel_thread+0x5c/0x74
      
      Fixes: 57a49436 ("ibmvnic: Reset sub-crqs during driver reset")
      Signed-off-by: NLijun Pan <ljp@linux.ibm.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      a0faaa27
    • S
      net: ena: fix packet's addresses for rx_offset feature · 1396d314
      Shay Agroskin 提交于
      This patch fixes two lines in which the rx_offset received by the device
      wasn't taken into account:
      
      - prefetch function:
      	In our driver the copied data would reside in
      	rx_info->page + rx_headroom + rx_offset
      
      	so the prefetch function is changed accordingly.
      
      - setting page_offset to zero for descriptors > 1:
      	for every descriptor but the first, the rx_offset is zero. Hence
      	the page_offset value should be set to rx_headroom.
      
      	The previous implementation changed the value of rx_info after
      	the descriptor was added to the SKB (essentially providing wrong
      	page offset).
      
      Fixes: 68f236df ("net: ena: add support for the rx offset feature")
      Signed-off-by: NShay Agroskin <shayagr@amazon.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      1396d314
    • S
      net: ena: set initial DMA width to avoid intel iommu issue · 09323b3b
      Shay Agroskin 提交于
      The ENA driver uses the readless mechanism, which uses DMA, to find
      out what the DMA mask is supposed to be.
      
      If DMA is used without setting the dma_mask first, it causes the
      Intel IOMMU driver to think that ENA is a 32-bit device and therefore
      disables IOMMU passthrough permanently.
      
      This patch sets the dma_mask to be ENA_MAX_PHYS_ADDR_SIZE_BITS=48
      before readless initialization in
      ena_device_init()->ena_com_mmio_reg_read_request_init(),
      which is large enough to workaround the intel_iommu issue.
      
      DMA mask is set again to the correct value after it's received from the
      device after readless is initialized.
      
      The patch also changes the driver to use dma_set_mask_and_coherent()
      function instead of the two pci_set_dma_mask() and
      pci_set_consistent_dma_mask() ones. Both methods achieve the same
      effect.
      
      Fixes: 1738cd3e ("net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)")
      Signed-off-by: NMike Cui <mikecui@amazon.com>
      Signed-off-by: NArthur Kiyanovski <akiyano@amazon.com>
      Signed-off-by: NShay Agroskin <shayagr@amazon.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      09323b3b
    • S
      net: ena: handle bad request id in ena_netdev · 5b7022cf
      Shay Agroskin 提交于
      After request id is checked in validate_rx_req_id() its value is still
      used in the line
      	rx_ring->free_ids[next_to_clean] =
      					rx_ring->ena_bufs[i].req_id;
      even if it was found to be out-of-bound for the array free_ids.
      
      The patch moves the request id to an earlier stage in the napi routine and
      makes sure its value isn't used if it's found out-of-bounds.
      
      Fixes: 30623e1e ("net: ena: avoid memory access violation by validating req_id properly")
      Signed-off-by: NIdo Segev <idose@amazon.com>
      Signed-off-by: NShay Agroskin <shayagr@amazon.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      5b7022cf
    • E
      dpaa2-eth: Fix compile error due to missing devlink support · 078eb55c
      Ezequiel Garcia 提交于
      The dpaa2 driver depends on devlink, so it should select
      NET_DEVLINK in order to fix compile errors, such as:
      
      drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.o: in function `dpaa2_eth_rx_err':
      dpaa2-eth.c:(.text+0x3cec): undefined reference to `devlink_trap_report'
      drivers/net/ethernet/freescale/dpaa2/dpaa2-eth-devlink.o: in function `dpaa2_eth_dl_info_get':
      dpaa2-eth-devlink.c:(.text+0x160): undefined reference to `devlink_info_driver_name_put'
      
      Fixes: ceeb03ad ("dpaa2-eth: add basic devlink support")
      Signed-off-by: NEzequiel Garcia <ezequiel@collabora.com>
      Signed-off-by: NIoana Ciornei <ioana.ciornei@nxp.com>
      Link: https://lore.kernel.org/r/20201123163553.1666476-1-ciorneiioana@gmail.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      078eb55c
    • L
      aquantia: Remove the build_skb path · 9bd2702d
      Lincoln Ramsay 提交于
      When performing IPv6 forwarding, there is an expectation that SKBs
      will have some headroom. When forwarding a packet from the aquantia
      driver, this does not always happen, triggering a kernel warning.
      
      aq_ring.c has this code (edited slightly for brevity):
      
      if (buff->is_eop && buff->len <= AQ_CFG_RX_FRAME_MAX - AQ_SKB_ALIGN) {
          skb = build_skb(aq_buf_vaddr(&buff->rxdata), AQ_CFG_RX_FRAME_MAX);
      } else {
          skb = napi_alloc_skb(napi, AQ_CFG_RX_HDR_SIZE);
      
      There is a significant difference between the SKB produced by these
      2 code paths. When napi_alloc_skb creates an SKB, there is a certain
      amount of headroom reserved. However, this is not done in the
      build_skb codepath.
      
      As the hardware buffer that build_skb is built around does not
      handle the presence of the SKB header, this code path is being
      removed and the napi_alloc_skb path will always be used. This code
      path does have to copy the packet header into the SKB, but it adds
      the packet data as a frag.
      
      Fixes: 018423e9 ("net: ethernet: aquantia: Add ring support code")
      Signed-off-by: NLincoln Ramsay <lincoln.ramsay@opengear.com>
      Link: https://lore.kernel.org/r/MWHPR1001MB23184F3EAFA413E0D1910EC9E8FC0@MWHPR1001MB2318.namprd10.prod.outlook.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      9bd2702d
  2. 24 11月, 2020 1 次提交
  3. 22 11月, 2020 4 次提交
  4. 21 11月, 2020 3 次提交
  5. 20 11月, 2020 2 次提交
  6. 19 11月, 2020 5 次提交
  7. 18 11月, 2020 14 次提交
    • D
      qed: fix ILT configuration of SRC block · 93be5261
      Dmitry Bogdanov 提交于
      The code refactoring of ILT configuration was not complete, the old
      unused variables were used for the SRC block. That could lead to the memory
      corruption by HW when rx filters are configured.
      This patch completes that refactoring.
      
      Fixes: 8a52bbab (qed: Debug feature: ilt and mdump)
      Signed-off-by: NIgor Russkikh <irusskikh@marvell.com>
      Signed-off-by: NAriel Elior <aelior@marvell.com>
      Signed-off-by: NDmitry Bogdanov <dbogdanov@marvell.com>
      Link: https://lore.kernel.org/r/20201116132944.2055-1-dbogdanov@marvell.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      93be5261
    • A
      enetc: Workaround for MDIO register access issue · fd5736bf
      Alex Marginean 提交于
      Due to a hardware issue, an access to MDIO registers
      that is concurrent with other ENETC register accesses
      may lead to the MDIO access being dropped or corrupted.
      The workaround introduces locking for all register accesses
      to the ENETC register space.  To reduce performance impact,
      a readers-writers locking scheme has been implemented.
      The writer in this case is the MDIO access code (irrelevant
      whether that MDIO access is a register read or write), and
      the reader is any access code to non-MDIO ENETC registers.
      Also, the datapath functions acquire the read lock fewer times
      and use _hot accessors.  All the rest of the code uses the _wa
      accessors which lock every register access.
      The commit introducing MDIO support is -
      commit ebfcb23d ("enetc: Add ENETC PF level external MDIO support")
      but due to subsequent refactoring this patch is applicable on
      top of a later commit.
      
      Fixes: 6517798d ("enetc: Make MDIO accessors more generic and export to include/linux/fsl")
      Signed-off-by: NAlex Marginean <alexandru.marginean@nxp.com>
      Signed-off-by: NVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: NClaudiu Manoil <claudiu.manoil@nxp.com>
      Link: https://lore.kernel.org/r/20201112182608.26177-1-claudiu.manoil@nxp.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      fd5736bf
    • W
      net/mlx5: fix error return code in mlx5e_tc_nic_init() · 68ec32da
      Wang Hai 提交于
      Fix to return a negative error code from the error handling
      case instead of 0, as done elsewhere in this function.
      
      Fixes: aedd133d ("net/mlx5e: Support CT offload for tc nic flows")
      Reported-by: NHulk Robot <hulkci@huawei.com>
      Signed-off-by: NWang Hai <wanghai38@huawei.com>
      Signed-off-by: NSaeed Mahameed <saeedm@nvidia.com>
      68ec32da
    • E
      net/mlx5: E-Switch, Fail mlx5_esw_modify_vport_rate if qos disabled · 5b8631c7
      Eli Cohen 提交于
      Avoid calling mlx5_esw_modify_vport_rate() if qos is not enabled and
      avoid unnecessary syndrome messages from firmware.
      
      Fixes: fcb64c0f ("net/mlx5: E-Switch, add ingress rate support")
      Signed-off-by: NEli Cohen <elic@nvidia.com>
      Reviewed-by: NRoi Dayan <roid@nvidia.com>
      Signed-off-by: NSaeed Mahameed <saeedm@nvidia.com>
      5b8631c7
    • V
      net/mlx5: Disable QoS when min_rates on all VFs are zero · 470b7475
      Vladyslav Tarasiuk 提交于
      Currently when QoS is enabled for VF and any min_rate is configured,
      the driver sets bw_share value to at least 1 and doesn’t allow to set
      it to 0 to make minimal rate unlimited. It means there is always a
      minimal rate configured for every VF, even if user tries to remove it.
      
      In order to make QoS disable possible, check whether all vports have
      configured min_rate = 0. If this is true, set their bw_share to 0 to
      disable min_rate limitations.
      
      Fixes: c9497c98 ("net/mlx5: Add support for setting VF min rate")
      Signed-off-by: NVladyslav Tarasiuk <vladyslavt@nvidia.com>
      Reviewed-by: NMoshe Shemesh <moshe@nvidia.com>
      Signed-off-by: NSaeed Mahameed <saeedm@nvidia.com>
      470b7475
    • V
      net/mlx5: Clear bw_share upon VF disable · 1ce5fc72
      Vladyslav Tarasiuk 提交于
      Currently, if user disables VFs with some min and max rates configured,
      they are cleared. But QoS data is not cleared and restored upon next VF
      enable placing limits on minimal rate for given VF, when user expects
      none.
      
      To match cleared vport->info struct with QoS-related min and max rates
      upon VF disable, clear vport->qos struct too.
      
      Fixes: 556b9d16 ("net/mlx5: Clear VF's configuration on disabling SRIOV")
      Signed-off-by: NVladyslav Tarasiuk <vladyslavt@nvidia.com>
      Reviewed-by: NMoshe Shemesh <moshe@nvidia.com>
      Signed-off-by: NSaeed Mahameed <saeedm@nvidia.com>
      1ce5fc72
    • M
      net/mlx5: Add handling of port type in rule deletion · 8cbcc5ef
      Michael Guralnik 提交于
      Handle destruction of rules with port destination type to enable
      full destruction of flow.
      
      Without this handling of TX rules the deletion of these rules fails.
      Dmesg of flow destruction failure:
      
      [  203.714146] mlx5_core 0000:00:0b.0: mlx5_cmd_check:753:(pid 342): SET_FLOW_TABLE_ENTRY(0x936) op_mod(0x0) failed, status bad parameter(0x3), syndrome (0x144b7a)
      [  210.547387] ------------[ cut here ]------------
      [  210.548663] refcount_t: decrement hit 0; leaking memory.
      [  210.550651] WARNING: CPU: 4 PID: 342 at lib/refcount.c:31 refcount_warn_saturate+0x5c/0x110
      [  210.550654] Modules linked in: mlx5_ib mlx5_core ib_ipoib rdma_ucm rdma_cm iw_cm ib_cm ib_umad ib_uverbs ib_core
      [  210.550675] CPU: 4 PID: 342 Comm: test Not tainted 5.8.0-rc2+ #116
      [  210.550678] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.12.1-0-ga5cab58e9a3f-prebuilt.qemu.org 04/01/2014
      [  210.550680] RIP: 0010:refcount_warn_saturate+0x5c/0x110
      [  210.550685] Code: c6 d1 1b 01 00 0f 84 ad 00 00 00 5b 5d c3 80 3d b5 d1 1b 01 00 75 f4 48 c7 c7 20 d1 15 82 c6 05 a5 d1 1b 01 01 e8 a7 eb af ff <0f> 0b eb dd 80 3d 99 d1 1b 01 00 75 d4 48 c7 c7 c0 cf 15 82 c6 05
      [  210.550687] RSP: 0018:ffff8881642e77e8 EFLAGS: 00010282
      [  210.550691] RAX: 0000000000000000 RBX: 0000000000000004 RCX: 0000000000000000
      [  210.550694] RDX: 0000000000000027 RSI: 0000000000000004 RDI: ffffed102c85ceef
      [  210.550696] RBP: ffff888161720428 R08: ffffffff8124c10e R09: ffffed103243beae
      [  210.550698] R10: ffff8881921df56b R11: ffffed103243bead R12: ffff8881841b4180
      [  210.550701] R13: ffff888161720428 R14: ffff8881616d0000 R15: ffff888161720380
      [  210.550704] FS:  00007fc27f025740(0000) GS:ffff888192000000(0000) knlGS:0000000000000000
      [  210.550706] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [  210.550708] CR2: 0000557e4b41a6a0 CR3: 0000000002415004 CR4: 0000000000360ea0
      [  210.550711] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      [  210.550713] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
      [  210.550715] Call Trace:
      [  210.550717]  mlx5_del_flow_rules+0x484/0x490 [mlx5_core]
      [  210.550720]  ? mlx5_cmd_set_fte+0xa80/0xa80 [mlx5_core]
      [  210.550722]  mlx5_ib_destroy_flow+0x17f/0x280 [mlx5_ib]
      [  210.550724]  uverbs_free_flow+0x4c/0x90 [ib_uverbs]
      [  210.550726]  destroy_hw_idr_uobject+0x41/0xb0 [ib_uverbs]
      [  210.550728]  uverbs_destroy_uobject+0xaa/0x390 [ib_uverbs]
      [  210.550731]  __uverbs_cleanup_ufile+0x129/0x1b0 [ib_uverbs]
      [  210.550733]  ? uverbs_destroy_uobject+0x390/0x390 [ib_uverbs]
      [  210.550735]  uverbs_destroy_ufile_hw+0x78/0x190 [ib_uverbs]
      [  210.550737]  ib_uverbs_close+0x36/0x140 [ib_uverbs]
      [  210.550739]  __fput+0x181/0x380
      [  210.550741]  task_work_run+0x88/0xd0
      [  210.550743]  do_exit+0x5f6/0x13b0
      [  210.550745]  ? sched_clock_cpu+0x30/0x140
      [  210.550747]  ? is_current_pgrp_orphaned+0x70/0x70
      [  210.550750]  ? lock_downgrade+0x360/0x360
      [  210.550752]  ? mark_held_locks+0x1d/0x90
      [  210.550754]  do_group_exit+0x8a/0x140
      [  210.550756]  get_signal+0x20a/0xf50
      [  210.550758]  do_signal+0x8c/0xbe0
      [  210.550760]  ? hrtimer_nanosleep+0x1d8/0x200
      [  210.550762]  ? nanosleep_copyout+0x50/0x50
      [  210.550764]  ? restore_sigcontext+0x320/0x320
      [  210.550766]  ? __hrtimer_init+0xf0/0xf0
      [  210.550768]  ? timespec64_add_safe+0x150/0x150
      [  210.550770]  ? mark_held_locks+0x1d/0x90
      [  210.550772]  ? lockdep_hardirqs_on_prepare+0x14c/0x240
      [  210.550774]  __prepare_exit_to_usermode+0x119/0x170
      [  210.550776]  do_syscall_64+0x65/0x300
      [  210.550778]  ? trace_hardirqs_off+0x10/0x120
      [  210.550781]  ? mark_held_locks+0x1d/0x90
      [  210.550783]  ? asm_sysvec_apic_timer_interrupt+0xa/0x20
      [  210.550785]  ? lockdep_hardirqs_on+0x112/0x190
      [  210.550787]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
      [  210.550789] RIP: 0033:0x7fc27f1cd157
      [  210.550791] Code: Bad RIP value.
      [  210.550793] RSP: 002b:00007ffd4db27ea8 EFLAGS: 00000246 ORIG_RAX: 0000000000000023
      [  210.550798] RAX: fffffffffffffdfc RBX: ffffffffffffff80 RCX: 00007fc27f1cd157
      [  210.550800] RDX: 00007fc27f025740 RSI: 00007ffd4db27eb0 RDI: 00007ffd4db27eb0
      [  210.550803] RBP: 0000000000000016 R08: 0000000000000000 R09: 000000000000000e
      [  210.550805] R10: 00007ffd4db27dc7 R11: 0000000000000246 R12: 0000000000400c00
      [  210.550808] R13: 00007ffd4db285f0 R14: 0000000000000000 R15: 0000000000000000
      [  210.550809] irq event stamp: 49399
      [  210.550812] hardirqs last  enabled at (49399): [<ffffffff81172d36>] console_unlock+0x556/0x6f0
      [  210.550815] hardirqs last disabled at (49398): [<ffffffff81172897>] console_unlock+0xb7/0x6f0
      [  210.550818] softirqs last  enabled at (48706): [<ffffffff81e0037b>] __do_softirq+0x37b/0x60c
      [  210.550820] softirqs last disabled at (48697): [<ffffffff81c00e2f>] asm_call_on_stack+0xf/0x20
      [  210.550822] ---[ end trace ad18c0e6fa846454 ]---
      [  210.581862] mlx5_core 0000:00:0c.0: mlx5_destroy_flow_table:2132:(pid 342): Flow table 262150 wasn't destroyed, refcount > 1
      
      Fixes: a7ee18bd ("RDMA/mlx5: Allow creating a matcher for a NIC TX flow table")
      Signed-off-by: NMichael Guralnik <michaelgur@nvidia.com>
      Reviewed-by: NMark Bloch <mbloch@nvidia.com>
      Reviewed-by: NMaor Gottlieb <maorg@nvidia.com>
      Signed-off-by: NSaeed Mahameed <saeedm@nvidia.com>
      8cbcc5ef
    • M
      net/mlx5e: Fix check if netdev is bond slave · 219b3267
      Maor Dickman 提交于
      Bond events handler uses bond_slave_get_rtnl to check if net device
      is bond slave. bond_slave_get_rtnl return the rcu rx_handler pointer
      from the netdev which exists for bond slaves but also exists for
      devices that are attached to linux bridge so using it as indication
      for bond slave is wrong.
      
      Fix by using netif_is_lag_port instead.
      
      Fixes: 7e51891a ("net/mlx5e: Use netdev events to set/del egress acl forward-to-vport rule")
      Signed-off-by: NMaor Dickman <maord@nvidia.com>
      Reviewed-by: NRaed Salem <raeds@nvidia.com>
      Reviewed-by: NAriel Levkovich <lariel@nvidia.com>
      Signed-off-by: NSaeed Mahameed <saeedm@nvidia.com>
      219b3267
    • H
      net/mlx5e: Fix IPsec packet drop by mlx5e_tc_update_skb · 6248ce99
      Huy Nguyen 提交于
      Both TC and IPsec crypto offload use metadata_regB to store
      private information. Since TC does not use bit 31 of regB, IPsec
      will use bit 31 as the IPsec packet marker. The IPsec's regB usage
      is changed to:
      Bit31: IPsec marker
      Bit30-24: IPsec syndrome
      Bit23-0: IPsec obj id
      
      Fixes: b2ac7541 ("net/mlx5e: IPsec: Add Connect-X IPsec Rx data path offload")
      Signed-off-by: NHuy Nguyen <huyn@mellanox.com>
      Reviewed-by: NRaed Salem <raeds@nvidia.com>
      Reviewed-by: NAriel Levkovich <lariel@nvidia.com>
      Signed-off-by: NSaeed Mahameed <saeedm@nvidia.com>
      6248ce99
    • H
      net/mlx5e: Set IPsec WAs only in IP's non checksum partial case. · 5cfb540e
      Huy Nguyen 提交于
      The IP's checksum partial still requires L4 csum flag on Ethernet WQE.
      Make the IPsec WAs only for the IP's non checksum partial case
      (for example icmd packet)
      
      Fixes: 5be01904 ("net/mlx5e: IPsec: Add Connect-X IPsec Tx data path offload")
      Signed-off-by: NHuy Nguyen <huyn@mellanox.com>
      Reviewed-by: NRaed Salem <raeds@nvidia.com>
      Reviewed-by: NAlaa Hleihel <alaa@nvidia.com>
      Signed-off-by: NSaeed Mahameed <saeedm@nvidia.com>
      5cfb540e
    • M
      net/mlx5e: Fix refcount leak on kTLS RX resync · ea636098
      Maxim Mikityanskiy 提交于
      On resync, the driver calls inet_lookup_established
      (__inet6_lookup_established) that increases sk_refcnt of the socket. To
      decrease it, the driver set skb->destructor to sock_edemux. However, it
      didn't work well, because the TCP stack also sets this destructor for
      early demux, and the refcount gets decreased only once, while increased
      two times (in mlx5e and in the TCP stack). It leads to a socket leak, a
      TLS context leak, which in the end leads to calling tls_dev_del twice:
      on socket close and on driver unload, which in turn leads to a crash.
      
      This commit fixes the refcount leak by calling sock_gen_put right away
      after using the socket, thus fixing all the subsequent issues.
      
      Fixes: 0419d8c9 ("net/mlx5e: kTLS, Add kTLS RX resync support")
      Signed-off-by: NMaxim Mikityanskiy <maximmi@mellanox.com>
      Reviewed-by: NTariq Toukan <tariqt@nvidia.com>
      Signed-off-by: NSaeed Mahameed <saeedm@nvidia.com>
      ea636098
    • J
      net: ftgmac100: Fix crash when removing driver · 3d517945
      Joel Stanley 提交于
      When removing the driver we would hit BUG_ON(!list_empty(&dev->ptype_specific))
      in net/core/dev.c due to still having the NC-SI packet handler
      registered.
      
       # echo 1e660000.ethernet > /sys/bus/platform/drivers/ftgmac100/unbind
        ------------[ cut here ]------------
        kernel BUG at net/core/dev.c:10254!
        Internal error: Oops - BUG: 0 [#1] SMP ARM
        CPU: 0 PID: 115 Comm: sh Not tainted 5.10.0-rc3-next-20201111-00007-g02e0365710c4 #46
        Hardware name: Generic DT based system
        PC is at netdev_run_todo+0x314/0x394
        LR is at cpumask_next+0x20/0x24
        pc : [<806f5830>]    lr : [<80863cb0>]    psr: 80000153
        sp : 855bbd58  ip : 00000001  fp : 855bbdac
        r10: 80c03d00  r9 : 80c06228  r8 : 81158c54
        r7 : 00000000  r6 : 80c05dec  r5 : 80c05d18  r4 : 813b9280
        r3 : 813b9054  r2 : 8122c470  r1 : 00000002  r0 : 00000002
        Flags: Nzcv  IRQs on  FIQs off  Mode SVC_32  ISA ARM  Segment none
        Control: 00c5387d  Table: 85514008  DAC: 00000051
        Process sh (pid: 115, stack limit = 0x7cb5703d)
       ...
        Backtrace:
        [<806f551c>] (netdev_run_todo) from [<80707eec>] (rtnl_unlock+0x18/0x1c)
         r10:00000051 r9:854ed710 r8:81158c54 r7:80c76bb0 r6:81158c10 r5:8115b410
         r4:813b9000
        [<80707ed4>] (rtnl_unlock) from [<806f5db8>] (unregister_netdev+0x2c/0x30)
        [<806f5d8c>] (unregister_netdev) from [<805a8180>] (ftgmac100_remove+0x20/0xa8)
         r5:8115b410 r4:813b9000
        [<805a8160>] (ftgmac100_remove) from [<805355e4>] (platform_drv_remove+0x34/0x4c)
      
      Fixes: bd466c3f ("net/faraday: Support NCSI mode")
      Signed-off-by: NJoel Stanley <joel@jms.id.au>
      Link: https://lore.kernel.org/r/20201117024448.1170761-1-joel@jms.id.auSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      3d517945
    • Z
      net: b44: fix error return code in b44_init_one() · 7b027c24
      Zhang Changzhong 提交于
      Fix to return a negative error code from the error handling
      case instead of 0, as done elsewhere in this function.
      
      Fixes: 39a6f4bc ("b44: replace the ssb_dma API with the generic DMA API")
      Reported-by: NHulk Robot <hulkci@huawei.com>
      Signed-off-by: NZhang Changzhong <zhangchangzhong@huawei.com>
      Reviewed-by: NMichael Chan <michael.chan@broadcom.com>
      Link: https://lore.kernel.org/r/1605582131-36735-1-git-send-email-zhangchangzhong@huawei.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      7b027c24
    • Z
      qed: fix error return code in qed_iwarp_ll2_start() · cb47d16e
      Zhang Changzhong 提交于
      Fix to return a negative error code from the error handling
      case instead of 0, as done elsewhere in this function.
      
      Fixes: 469981b1 ("qed: Add unaligned and packed packet processing")
      Fixes: fcb39f6c ("qed: Add mpa buffer descriptors for storing and processing mpa fpdus")
      Fixes: 1e28eaad ("qed: Add iWARP support for fpdu spanned over more than two tcp packets")
      Reported-by: NHulk Robot <hulkci@huawei.com>
      Signed-off-by: NZhang Changzhong <zhangchangzhong@huawei.com>
      Acked-by: Michal Kalderon <michal.kalderon@marvell.com>
      Link: https://lore.kernel.org/r/1605532033-27373-1-git-send-email-zhangchangzhong@huawei.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      cb47d16e
  8. 17 11月, 2020 4 次提交