1. 23 10月, 2019 1 次提交
  2. 19 10月, 2019 5 次提交
  3. 18 10月, 2019 3 次提交
  4. 05 10月, 2019 12 次提交
  5. 01 10月, 2019 12 次提交
    • B
      RDMA/iwcm: Fix a lock inversion issue · b66f31ef
      Bart Van Assche 提交于
      This patch fixes the lock inversion complaint:
      
      ============================================
      WARNING: possible recursive locking detected
      5.3.0-rc7-dbg+ #1 Not tainted
      --------------------------------------------
      kworker/u16:6/171 is trying to acquire lock:
      00000000035c6e6c (&id_priv->handler_mutex){+.+.}, at: rdma_destroy_id+0x78/0x4a0 [rdma_cm]
      
      but task is already holding lock:
      00000000bc7c307d (&id_priv->handler_mutex){+.+.}, at: iw_conn_req_handler+0x151/0x680 [rdma_cm]
      
      other info that might help us debug this:
       Possible unsafe locking scenario:
      
             CPU0
             ----
        lock(&id_priv->handler_mutex);
        lock(&id_priv->handler_mutex);
      
       *** DEADLOCK ***
      
       May be due to missing lock nesting notation
      
      3 locks held by kworker/u16:6/171:
       #0: 00000000e2eaa773 ((wq_completion)iw_cm_wq){+.+.}, at: process_one_work+0x472/0xac0
       #1: 000000001efd357b ((work_completion)(&work->work)#3){+.+.}, at: process_one_work+0x476/0xac0
       #2: 00000000bc7c307d (&id_priv->handler_mutex){+.+.}, at: iw_conn_req_handler+0x151/0x680 [rdma_cm]
      
      stack backtrace:
      CPU: 3 PID: 171 Comm: kworker/u16:6 Not tainted 5.3.0-rc7-dbg+ #1
      Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
      Workqueue: iw_cm_wq cm_work_handler [iw_cm]
      Call Trace:
       dump_stack+0x8a/0xd6
       __lock_acquire.cold+0xe1/0x24d
       lock_acquire+0x106/0x240
       __mutex_lock+0x12e/0xcb0
       mutex_lock_nested+0x1f/0x30
       rdma_destroy_id+0x78/0x4a0 [rdma_cm]
       iw_conn_req_handler+0x5c9/0x680 [rdma_cm]
       cm_work_handler+0xe62/0x1100 [iw_cm]
       process_one_work+0x56d/0xac0
       worker_thread+0x7a/0x5d0
       kthread+0x1bc/0x210
       ret_from_fork+0x24/0x30
      
      This is not a bug as there are actually two lock classes here.
      
      Link: https://lore.kernel.org/r/20190930231707.48259-3-bvanassche@acm.org
      Fixes: de910bd9 ("RDMA/cma: Simplify locking needed for serialization of callbacks")
      Signed-off-by: NBart Van Assche <bvanassche@acm.org>
      Reviewed-by: NJason Gunthorpe <jgg@mellanox.com>
      Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
      b66f31ef
    • P
      RDMA/iw_cxgb4: fix SRQ access from dump_qp() · 91724c1e
      Potnuri Bharat Teja 提交于
      dump_qp() is wrongly trying to dump SRQ structures as QP when SRQ is used
      by the application. This patch matches the QPID before dumping them.  Also
      removes unwanted SRQ id addition to QP id xarray.
      
      Fixes: 2f431291 ("cxgb4: Convert qpidr to XArray")
      Link: https://lore.kernel.org/r/20190930074119.20046-1-bharat@chelsio.comSigned-off-by: NRahul Kundu <rahul.kundu@chelsio.com>
      Signed-off-by: NPotnuri Bharat Teja <bharat@chelsio.com>
      Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
      91724c1e
    • N
      RDMA/hfi1: Prevent memory leak in sdma_init · 34b3be18
      Navid Emamdoost 提交于
      In sdma_init if rhashtable_init fails the allocated memory for
      tmp_sdma_rht should be released.
      
      Fixes: 5a52a7ac ("IB/hfi1: NULL pointer dereference when freeing rhashtable")
      Link: https://lore.kernel.org/r/20190925144543.10141-1-navid.emamdoost@gmail.comSigned-off-by: NNavid Emamdoost <navid.emamdoost@gmail.com>
      Acked-by: NDennis Dalessandro <dennis.dalessandro@intel.com>
      Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
      34b3be18
    • M
      RDMA/core: Fix use after free and refcnt leak on ndev in_device in iwarp_query_port · 390d3fdc
      Michal Kalderon 提交于
      If an iWARP driver is probed and removed while there are no ips set for
      the device, it will lead to a reference count leak on the inet device of
      the netdevice.
      
      In addition, the netdevice was accessed after already calling netdev_put,
      which could lead to using the netdev after already freed.
      
      Fixes: 4929116b ("RDMA/core: Add common iWARP query port")
      Link: https://lore.kernel.org/r/20190925123332.10746-1-michal.kalderon@marvell.comSigned-off-by: NAriel Elior <ariel.elior@marvell.com>
      Signed-off-by: NMichal Kalderon <michal.kalderon@marvell.com>
      Reviewed-by: NShiraz Saleem <shiraz.saleem@intel.com>
      Reviewed-by: NKamal Heib <kamalheib1@gmail.com>
      Reviewed-by: NJason Gunthorpe <jgg@mellanox.com>
      Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
      390d3fdc
    • K
      RDMA/siw: Fix serialization issue in write_space() · df791c54
      Krishnamraju Eraparaju 提交于
      In siw_qp_llp_write_space(), 'sock' members should be accessed with
      sk_callback_lock held, otherwise, it could race with
      siw_sk_restore_upcalls(). And this could cause "NULL deref" panic.  Below
      panic is due to the NULL cep returned from sk_to_cep(sk):
      
        Call Trace:
         <IRQ>    siw_qp_llp_write_space+0x11/0x40 [siw]
         tcp_check_space+0x4c/0xf0
         tcp_rcv_established+0x52b/0x630
         tcp_v4_do_rcv+0xf4/0x1e0
         tcp_v4_rcv+0x9b8/0xab0
         ip_protocol_deliver_rcu+0x2c/0x1c0
         ip_local_deliver_finish+0x44/0x50
         ip_local_deliver+0x6b/0xf0
         ? ip_protocol_deliver_rcu+0x1c0/0x1c0
         ip_rcv+0x52/0xd0
         ? ip_rcv_finish_core.isra.14+0x390/0x390
         __netif_receive_skb_one_core+0x83/0xa0
         netif_receive_skb_internal+0x73/0xb0
         napi_gro_frags+0x1ff/0x2b0
         t4_ethrx_handler+0x4a7/0x740 [cxgb4]
         process_responses+0x2c9/0x590 [cxgb4]
         ? t4_sge_intr_msix+0x1d/0x30 [cxgb4]
         ? handle_irq_event_percpu+0x51/0x70
         ? handle_irq_event+0x41/0x60
         ? handle_edge_irq+0x97/0x1a0
         napi_rx_handler+0x14/0xe0 [cxgb4]
         net_rx_action+0x2af/0x410
         __do_softirq+0xda/0x2a8
         do_softirq_own_stack+0x2a/0x40
         </IRQ>
         do_softirq+0x50/0x60
         __local_bh_enable_ip+0x50/0x60
         ip_finish_output2+0x18f/0x520
         ip_output+0x6e/0xf0
         ? __ip_finish_output+0x1f0/0x1f0
         __ip_queue_xmit+0x14f/0x3d0
         ? __slab_alloc+0x4b/0x58
         __tcp_transmit_skb+0x57d/0xa60
         tcp_write_xmit+0x23b/0xfd0
         __tcp_push_pending_frames+0x2e/0xf0
         tcp_sendmsg_locked+0x939/0xd50
         tcp_sendmsg+0x27/0x40
         sock_sendmsg+0x57/0x80
         siw_tx_hdt+0x894/0xb20 [siw]
         ? find_busiest_group+0x3e/0x5b0
         ? common_interrupt+0xa/0xf
         ? common_interrupt+0xa/0xf
         ? common_interrupt+0xa/0xf
         siw_qp_sq_process+0xf1/0xe60 [siw]
         ? __wake_up_common_lock+0x87/0xc0
         siw_sq_resume+0x33/0xe0 [siw]
         siw_run_sq+0xac/0x190 [siw]
         ? remove_wait_queue+0x60/0x60
         kthread+0xf8/0x130
         ? siw_sq_resume+0xe0/0xe0 [siw]
         ? kthread_bind+0x10/0x10
         ret_from_fork+0x35/0x40
      
      Fixes: f29dd55b ("rdma/siw: queue pair methods")
      Link: https://lore.kernel.org/r/20190923101112.32685-1-krishna2@chelsio.comSigned-off-by: NKrishnamraju Eraparaju <krishna2@chelsio.com>
      Reviewed-by: NBernard Metzler <bmt@zurich.ibm.com>
      Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
      df791c54
    • A
      RDMA/vmw_pvrdma: Free SRQ only once · 18545e8b
      Adit Ranadive 提交于
      An extra kfree cleanup was missed since these are now deallocated by core.
      
      Link: https://lore.kernel.org/r/1568848066-12449-1-git-send-email-aditr@vmware.com
      Cc: <stable@vger.kernel.org>
      Fixes: 68e326de ("RDMA: Handle SRQ allocations by IB/core")
      Signed-off-by: NAdit Ranadive <aditr@vmware.com>
      Reviewed-by: NVishnu Dasa <vdasa@vmware.com>
      Reviewed-by: NJason Gunthorpe <jgg@mellanox.com>
      Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
      18545e8b
    • L
      Linux 5.4-rc1 · 54ecb8f7
      Linus Torvalds 提交于
      54ecb8f7
    • L
      Merge tag 'for-5.4-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux · bb48a591
      Linus Torvalds 提交于
      Pull btrfs fixes from David Sterba:
       "A bunch of fixes that accumulated in recent weeks, mostly material for
        stable.
      
        Summary:
      
         - fix for regression from 5.3 that prevents to use balance convert
           with single profile
      
         - qgroup fixes: rescan race, accounting leak with multiple writers,
           potential leak after io failure recovery
      
         - fix for use after free in relocation (reported by KASAN)
      
         - other error handling fixups"
      
      * tag 'for-5.4-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
        btrfs: qgroup: Fix reserved data space leak if we have multiple reserve calls
        btrfs: qgroup: Fix the wrong target io_tree when freeing reserved data space
        btrfs: Fix a regression which we can't convert to SINGLE profile
        btrfs: relocation: fix use-after-free on dead relocation roots
        Btrfs: fix race setting up and completing qgroup rescan workers
        Btrfs: fix missing error return if writeback for extent buffer never started
        btrfs: adjust dirty_metadata_bytes after writeback failure of extent buffer
        Btrfs: fix selftests failure due to uninitialized i_mode in test inodes
      bb48a591
    • L
      Merge tag 'csky-for-linus-5.4-rc1' of git://github.com/c-sky/csky-linux · 80b29b6b
      Linus Torvalds 提交于
      Pull csky updates from Guo Ren:
       "This round of csky subsystem just some fixups:
      
         - Fix mb() synchronization problem
      
         - Fix dma_alloc_coherent with PAGE_SO attribute
      
         - Fix cache_op failed when cross memory ZONEs
      
         - Optimize arch_sync_dma_for_cpu/device with dma_inv_range
      
         - Fix ioremap function losing
      
         - Fix arch_get_unmapped_area() implementation
      
         - Fix defer cache flush for 610
      
         - Support kernel non-aligned access
      
         - Fix 610 vipt cache flush mechanism
      
         - Fix add zero_fp fixup perf backtrace panic
      
         - Move static keyword to the front of declaration
      
         - Fix csky_pmu.max_period assignment
      
         - Use generic free_initrd_mem()
      
         - entry: Remove unneeded need_resched() loop"
      
      * tag 'csky-for-linus-5.4-rc1' of git://github.com/c-sky/csky-linux:
        csky: Move static keyword to the front of declaration
        csky: entry: Remove unneeded need_resched() loop
        csky: Fixup csky_pmu.max_period assignment
        csky: Fixup add zero_fp fixup perf backtrace panic
        csky: Use generic free_initrd_mem()
        csky: Fixup 610 vipt cache flush mechanism
        csky: Support kernel non-aligned access
        csky: Fixup defer cache flush for 610
        csky: Fixup arch_get_unmapped_area() implementation
        csky: Fixup ioremap function losing
        csky: Optimize arch_sync_dma_for_cpu/device with dma_inv_range
        csky/dma: Fixup cache_op failed when cross memory ZONEs
        csky: Fixup dma_alloc_coherent with PAGE_SO attribute
        csky: Fixup mb() synchronization problem
      80b29b6b
    • L
      Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc · cef0aa0c
      Linus Torvalds 提交于
      Pull ARM SoC fixes from Olof Johansson:
       "A few fixes that have trickled in through the merge window:
      
         - Video fixes for OMAP due to panel-dpi driver removal
      
         - Clock fixes for OMAP that broke no-idle quirks + nfsroot on DRA7
      
         - Fixing arch version on ASpeed ast2500
      
         - Two fixes for reset handling on ARM SCMI"
      
      * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc:
        ARM: aspeed: ast2500 is ARMv6K
        reset: reset-scmi: add missing handle initialisation
        firmware: arm_scmi: reset: fix reset_state assignment in scmi_domain_reset
        bus: ti-sysc: Remove unpaired sysc_clkdm_deny_idle()
        ARM: dts: logicpd-som-lv: Fix i2c2 and i2c3 Pin mux
        ARM: dts: am3517-evm: Fix missing video
        ARM: dts: logicpd-torpedo-baseboard: Fix missing video
        ARM: omap2plus_defconfig: Fix missing video
        bus: ti-sysc: Fix handling of invalid clocks
        bus: ti-sysc: Fix clock handling for no-idle quirks
      cef0aa0c
    • L
      Merge tag 'trace-v5.4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace · cf4f493b
      Linus Torvalds 提交于
      Pull tracing fixes from Steven Rostedt:
       "A few more tracing fixes:
      
         - Fix a buffer overflow by checking nr_args correctly in probes
      
         - Fix a warning that is reported by clang
      
         - Fix a possible memory leak in error path of filter processing
      
         - Fix the selftest that checks for failures, but wasn't failing
      
         - Minor clean up on call site output of a memory trace event"
      
      * tag 'trace-v5.4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
        selftests/ftrace: Fix same probe error test
        mm, tracing: Print symbol name for call_site in trace events
        tracing: Have error path in predicate_parse() free its allocated memory
        tracing: Fix clang -Wint-in-bool-context warnings in IF_ASSIGN macro
        tracing/probe: Fix to check the difference of nr_args before adding probe
      cf4f493b
    • L
      Merge tag 'mmc-v5.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc · c710364f
      Linus Torvalds 提交于
      Pull more MMC updates from Ulf Hansson:
       "A couple more updates/fixes for MMC:
      
         - sdhci-pci: Add Genesys Logic GL975x support
      
         - sdhci-tegra: Recover loss in throughput for DMA
      
         - sdhci-of-esdhc: Fix DMA bug"
      
      * tag 'mmc-v5.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc:
        mmc: host: sdhci-pci: Add Genesys Logic GL975x support
        mmc: tegra: Implement ->set_dma_mask()
        mmc: sdhci: Let drivers define their DMA mask
        mmc: sdhci-of-esdhc: set DMA snooping based on DMA coherence
        mmc: sdhci: improve ADMA error reporting
      c710364f
  6. 30 9月, 2019 7 次提交