All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org, Steve Wise <swise@opengridcomputing.com>,
	Jason Gunthorpe <jgg@mellanox.com>
Subject: [PATCH 4.14 019/118] iw_cxgb4: only clear the ARMED bit if a notification is needed
Date: Mon, 15 Jan 2018 13:34:06 +0100	[thread overview]
Message-ID: <20180115123416.396412523@linuxfoundation.org> (raw)
In-Reply-To: <20180115123415.325497625@linuxfoundation.org>

4.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Steve Wise <swise@opengridcomputing.com>

commit 335ebf6fa35ca1c59b73f76fad19b249d3550e86 upstream.

In __flush_qp(), the CQ ARMED bit was being cleared regardless of
whether any notification is actually needed.  This resulted in the iser
termination logic getting stuck in ib_drain_sq() because the CQ was not
marked ARMED and thus the drain CQE notification wasn't triggered.

This new bug was exposed when this commit was merged:

commit cbb40fadd31c ("iw_cxgb4: only call the cq comp_handler when the
cq is armed")

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/infiniband/hw/cxgb4/qp.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

--- a/drivers/infiniband/hw/cxgb4/qp.c
+++ b/drivers/infiniband/hw/cxgb4/qp.c
@@ -1301,21 +1301,21 @@ static void __flush_qp(struct c4iw_qp *q
 	spin_unlock_irqrestore(&rchp->lock, flag);
 
 	if (schp == rchp) {
-		if (t4_clear_cq_armed(&rchp->cq) &&
-		    (rq_flushed || sq_flushed)) {
+		if ((rq_flushed || sq_flushed) &&
+		    t4_clear_cq_armed(&rchp->cq)) {
 			spin_lock_irqsave(&rchp->comp_handler_lock, flag);
 			(*rchp->ibcq.comp_handler)(&rchp->ibcq,
 						   rchp->ibcq.cq_context);
 			spin_unlock_irqrestore(&rchp->comp_handler_lock, flag);
 		}
 	} else {
-		if (t4_clear_cq_armed(&rchp->cq) && rq_flushed) {
+		if (rq_flushed && t4_clear_cq_armed(&rchp->cq)) {
 			spin_lock_irqsave(&rchp->comp_handler_lock, flag);
 			(*rchp->ibcq.comp_handler)(&rchp->ibcq,
 						   rchp->ibcq.cq_context);
 			spin_unlock_irqrestore(&rchp->comp_handler_lock, flag);
 		}
-		if (t4_clear_cq_armed(&schp->cq) && sq_flushed) {
+		if (sq_flushed && t4_clear_cq_armed(&schp->cq)) {
 			spin_lock_irqsave(&schp->comp_handler_lock, flag);
 			(*schp->ibcq.comp_handler)(&schp->ibcq,
 						   schp->ibcq.cq_context);

  parent reply	other threads:[~2018-01-15 13:24 UTC|newest]

Thread overview: 143+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-15 12:33 [PATCH 4.14 000/118] 4.14.14-stable review Greg Kroah-Hartman
2018-01-15 12:33 ` [PATCH 4.14 001/118] dm bufio: fix shrinker scans when (nr_to_scan < retain_target) Greg Kroah-Hartman
2018-01-15 12:33 ` [PATCH 4.14 002/118] KVM: Fix stack-out-of-bounds read in write_mmio Greg Kroah-Hartman
2018-01-15 12:33 ` [PATCH 4.14 003/118] can: vxcan: improve handling of missing peer name attribute Greg Kroah-Hartman
2018-01-15 12:33 ` [PATCH 4.14 004/118] can: gs_usb: fix return value of the "set_bittiming" callback Greg Kroah-Hartman
2018-01-15 12:33 ` [PATCH 4.14 005/118] IB/srpt: Disable RDMA access by the initiator Greg Kroah-Hartman
2018-01-15 12:33 ` [PATCH 4.14 006/118] IB/srpt: Fix ACL lookup during login Greg Kroah-Hartman
2018-01-15 12:33 ` [PATCH 4.14 007/118] MIPS: Validate PR_SET_FP_MODE prctl(2) requests against the ABI of the task Greg Kroah-Hartman
2018-01-15 12:33 ` [PATCH 4.14 008/118] MIPS: Factor out NT_PRFPREG regset access helpers Greg Kroah-Hartman
2018-01-15 12:33 ` [PATCH 4.14 009/118] MIPS: Guard against any partial write attempt with PTRACE_SETREGSET Greg Kroah-Hartman
2018-01-15 12:33 ` [PATCH 4.14 010/118] MIPS: Consistently handle buffer counter " Greg Kroah-Hartman
2018-01-15 12:33 ` [PATCH 4.14 011/118] MIPS: Fix an FCSR access API regression with NT_PRFPREG and MSA Greg Kroah-Hartman
2018-01-15 12:33 ` [PATCH 4.14 012/118] MIPS: Also verify sizeof `elf_fpreg_t with PTRACE_SETREGSET Greg Kroah-Hartman
2018-01-15 12:34 ` [PATCH 4.14 013/118] MIPS: Disallow outsized PTRACE_SETREGSET NT_PRFPREG regset accesses Greg Kroah-Hartman
2018-01-15 12:34 ` [PATCH 4.14 014/118] cgroup: fix css_task_iter crash on CSS_TASK_ITER_PROC Greg Kroah-Hartman
2018-01-15 12:34 ` [PATCH 4.14 015/118] kvm: vmx: Scrub hardware GPRs at VM-exit Greg Kroah-Hartman
2018-01-15 12:34 ` [PATCH 4.14 016/118] platform/x86: wmi: Call acpi_wmi_init() later Greg Kroah-Hartman
2018-01-15 12:34 ` [PATCH 4.14 017/118] iw_cxgb4: only call the cq comp_handler when the cq is armed Greg Kroah-Hartman
2018-01-15 12:34 ` [PATCH 4.14 018/118] iw_cxgb4: atomically flush the qp Greg Kroah-Hartman
2018-01-15 12:34 ` Greg Kroah-Hartman [this message]
2018-01-15 12:34 ` [PATCH 4.14 020/118] iw_cxgb4: reflect the original WR opcode in drain cqes Greg Kroah-Hartman
2018-01-15 12:34 ` [PATCH 4.14 021/118] iw_cxgb4: when flushing, complete all wrs in a chain Greg Kroah-Hartman
2018-01-15 12:34 ` [PATCH 4.14 022/118] x86/acpi: Handle SCI interrupts above legacy space gracefully Greg Kroah-Hartman
2018-01-15 12:34 ` [PATCH 4.14 023/118] ALSA: pcm: Remove incorrect snd_BUG_ON() usages Greg Kroah-Hartman
2018-01-15 12:34 ` [PATCH 4.14 024/118] ALSA: pcm: Workaround for weird PulseAudio behavior on rewind error Greg Kroah-Hartman
2018-01-15 12:34 ` [PATCH 4.14 025/118] ALSA: pcm: Add missing error checks in OSS emulation plugin builder Greg Kroah-Hartman
2018-01-15 12:34 ` [PATCH 4.14 026/118] ALSA: pcm: Abort properly at pending signal in OSS read/write loops Greg Kroah-Hartman
2018-01-15 12:34 ` [PATCH 4.14 027/118] ALSA: pcm: Allow aborting mutex lock at " Greg Kroah-Hartman
2018-01-15 12:34 ` [PATCH 4.14 028/118] ALSA: aloop: Release cable upon open error path Greg Kroah-Hartman
2018-01-15 12:34 ` [PATCH 4.14 029/118] ALSA: aloop: Fix inconsistent format due to incomplete rule Greg Kroah-Hartman
2018-01-15 12:34 ` [PATCH 4.14 030/118] ALSA: aloop: Fix racy hw constraints adjustment Greg Kroah-Hartman
2018-01-15 12:34 ` [PATCH 4.14 031/118] x86/acpi: Reduce code duplication in mp_override_legacy_irq() Greg Kroah-Hartman
2018-01-15 12:34 ` [PATCH 4.14 032/118] 8021q: fix a memory leak for VLAN 0 device Greg Kroah-Hartman
2018-01-15 12:34 ` [PATCH 4.14 033/118] ip6_tunnel: disable dst caching if tunnel is dual-stack Greg Kroah-Hartman
2018-01-15 12:34 ` [PATCH 4.14 034/118] net: core: fix module type in sock_diag_bind Greg Kroah-Hartman
2018-01-15 12:34 ` [PATCH 4.14 035/118] phylink: ensure we report link down when LOS asserted Greg Kroah-Hartman
2018-01-15 12:34 ` [PATCH 4.14 036/118] RDS: Heap OOB write in rds_message_alloc_sgs() Greg Kroah-Hartman
2018-01-15 12:34 ` [PATCH 4.14 037/118] RDS: null pointer dereference in rds_atomic_free_op Greg Kroah-Hartman
2018-01-15 12:34 ` [PATCH 4.14 038/118] net: fec: restore dev_id in the cases of probe error Greg Kroah-Hartman
2018-01-15 12:34 ` [PATCH 4.14 039/118] net: fec: defer probe if regulator is not ready Greg Kroah-Hartman
2018-01-15 12:34 ` [PATCH 4.14 040/118] net: fec: free/restore resource in related probe error pathes Greg Kroah-Hartman
2018-01-15 12:34 ` [PATCH 4.14 041/118] sctp: do not retransmit upon FragNeeded if PMTU discovery is disabled Greg Kroah-Hartman
2018-01-15 12:34 ` [PATCH 4.14 042/118] sctp: fix the handling of ICMP Frag Needed for too small MTUs Greg Kroah-Hartman
2018-01-15 12:34 ` [PATCH 4.14 043/118] sh_eth: fix TSU resource handling Greg Kroah-Hartman
2018-01-15 12:34 ` [PATCH 4.14 044/118] net: stmmac: enable EEE in MII, GMII or RGMII only Greg Kroah-Hartman
2018-01-15 12:34 ` [PATCH 4.14 045/118] sh_eth: fix SH7757 GEther initialization Greg Kroah-Hartman
2018-01-15 12:34 ` [PATCH 4.14 046/118] ipv6: fix possible mem leaks in ipv6_make_skb() Greg Kroah-Hartman
2018-01-15 12:34 ` [PATCH 4.14 047/118] ethtool: do not print warning for applications using legacy API Greg Kroah-Hartman
2018-01-15 12:34 ` [PATCH 4.14 048/118] mlxsw: spectrum_router: Fix NULL pointer deref Greg Kroah-Hartman
2018-01-15 12:34 ` [PATCH 4.14 049/118] net/sched: Fix update of lastuse in act modules implementing stats_update Greg Kroah-Hartman
2018-01-15 12:34 ` [PATCH 4.14 050/118] ipv6: sr: fix TLVs not being copied using setsockopt Greg Kroah-Hartman
2018-01-15 12:34 ` [PATCH 4.14 051/118] mlxsw: spectrum: Relax sanity checks during enslavement Greg Kroah-Hartman
2018-01-15 12:34 ` [PATCH 4.14 052/118] sfp: fix sfp-bus oops when removing socket/upstream Greg Kroah-Hartman
2018-01-15 12:34 ` [PATCH 4.14 053/118] Revert "Revert "xfrm: Fix stack-out-of-bounds read in xfrm_state_find."" Greg Kroah-Hartman
2018-01-15 13:23   ` Steffen Klassert
2018-01-15 13:37     ` Greg Kroah-Hartman
2018-01-15 16:56     ` David Miller
2018-01-16  6:33       ` Steffen Klassert
2018-01-16  7:44         ` Nicolas Dichtel
2018-01-16  8:12           ` Steffen Klassert
2018-01-16  8:12             ` Steffen Klassert
2018-01-16 15:32         ` David Miller
2018-01-16 17:44           ` Greg KH
2018-01-15 12:34 ` [PATCH 4.14 054/118] membarrier: Disable preemption when calling smp_call_function_many() Greg Kroah-Hartman
2018-01-15 12:34 ` [PATCH 4.14 055/118] crypto: algapi - fix NULL dereference in crypto_remove_spawns() Greg Kroah-Hartman
2018-01-15 12:34 ` [PATCH 4.14 056/118] mmc: renesas_sdhi: Add MODULE_LICENSE Greg Kroah-Hartman
2018-01-15 12:34 ` [PATCH 4.14 057/118] rbd: reacquire lock should update lock owner client id Greg Kroah-Hartman
2018-01-15 12:34 ` [PATCH 4.14 058/118] rbd: set max_segments to USHRT_MAX Greg Kroah-Hartman
2018-01-15 12:34 ` [PATCH 4.14 059/118] iwlwifi: pcie: fix DMA memory mapping / unmapping Greg Kroah-Hartman
2018-01-15 12:34 ` [PATCH 4.14 060/118] x86/microcode/intel: Extend BDW late-loading with a revision check Greg Kroah-Hartman
2018-01-15 12:34 ` [PATCH 4.14 061/118] KVM: x86: Add memory barrier on vmcs field lookup Greg Kroah-Hartman
2018-01-15 12:34 ` [PATCH 4.14 062/118] KVM: PPC: Book3S PR: Fix WIMG handling under pHyp Greg Kroah-Hartman
2018-01-15 12:34 ` [PATCH 4.14 063/118] KVM: PPC: Book3S HV: Drop prepare_done from struct kvm_resize_hpt Greg Kroah-Hartman
2018-01-15 12:34 ` [PATCH 4.14 064/118] KVM: PPC: Book3S HV: Fix use after free in case of multiple resize requests Greg Kroah-Hartman
2018-01-15 12:34 ` [PATCH 4.14 065/118] KVM: PPC: Book3S HV: Always flush TLB in kvmppc_alloc_reset_hpt() Greg Kroah-Hartman
2018-01-15 12:34 ` [PATCH 4.14 066/118] drm/vmwgfx: Dont cache framebuffer maps Greg Kroah-Hartman
2018-01-15 12:34 ` [PATCH 4.14 067/118] drm/vmwgfx: Potential off by one in vmw_view_add() Greg Kroah-Hartman
2018-01-15 12:34 ` [PATCH 4.14 068/118] drm/i915/gvt: Clear the shadow page table entry after post-sync Greg Kroah-Hartman
2018-01-15 12:34 ` [PATCH 4.14 069/118] drm/i915: Whitelist SLICE_COMMON_ECO_CHICKEN1 on Geminilake Greg Kroah-Hartman
2018-01-15 12:34 ` [PATCH 4.14 070/118] drm/i915: Move init_clock_gating() back to where it was Greg Kroah-Hartman
2018-01-15 12:34 ` [PATCH 4.14 071/118] drm/i915: Fix init_clock_gating for resume Greg Kroah-Hartman
2018-01-15 12:34 ` [PATCH 4.14 072/118] bpf: prevent out-of-bounds speculation Greg Kroah-Hartman
2018-01-15 12:35 ` [PATCH 4.14 073/118] bpf, array: fix overflow in max_entries and undefined behavior in index_mask Greg Kroah-Hartman
2018-01-15 12:35 ` [PATCH 4.14 074/118] bpf: arsh is not supported in 32 bit alu thus reject it Greg Kroah-Hartman
2018-01-15 12:35 ` [PATCH 4.14 075/118] USB: serial: cp210x: add IDs for LifeScan OneTouch Verio IQ Greg Kroah-Hartman
2018-01-15 12:35 ` [PATCH 4.14 076/118] USB: serial: cp210x: add new device ID ELV ALC 8xxx Greg Kroah-Hartman
2018-01-15 12:35 ` [PATCH 4.14 077/118] usb: misc: usb3503: make sure reset is low for at least 100us Greg Kroah-Hartman
2018-01-15 12:35 ` [PATCH 4.14 078/118] USB: fix usbmon BUG trigger Greg Kroah-Hartman
2018-01-15 12:35 ` [PATCH 4.14 079/118] USB: UDC core: fix double-free in usb_add_gadget_udc_release Greg Kroah-Hartman
2018-01-15 12:35 ` [PATCH 4.14 080/118] usbip: remove kernel addresses from usb device and urb debug msgs Greg Kroah-Hartman
2018-01-15 12:35 ` [PATCH 4.14 081/118] usbip: fix vudc_rx: harden CMD_SUBMIT path to handle malicious input Greg Kroah-Hartman
2018-01-15 12:35 ` [PATCH 4.14 082/118] usbip: vudc_tx: fix v_send_ret_submit() vulnerability to null xfer buffer Greg Kroah-Hartman
2018-01-15 12:35 ` [PATCH 4.14 083/118] staging: android: ashmem: fix a race condition in ASHMEM_SET_SIZE ioctl Greg Kroah-Hartman
2018-01-15 12:35 ` [PATCH 4.14 084/118] Bluetooth: Prevent stack info leak from the EFS element Greg Kroah-Hartman
2018-01-15 12:35 ` [PATCH 4.14 085/118] uas: ignore UAS for Norelsys NS1068(X) chips Greg Kroah-Hartman
2018-01-15 12:35 ` [PATCH 4.14 086/118] mux: core: fix double get_device() Greg Kroah-Hartman
2018-01-15 12:35 ` [PATCH 4.14 087/118] kdump: write correct address of mem_section into vmcoreinfo Greg Kroah-Hartman
2018-01-15 12:35 ` [PATCH 4.14 088/118] apparmor: fix ptrace label match when matching stacked labels Greg Kroah-Hartman
2018-01-15 12:35 ` [PATCH 4.14 089/118] e1000e: Fix e1000_check_for_copper_link_ich8lan return value Greg Kroah-Hartman
2018-01-15 12:35 ` [PATCH 4.14 090/118] x86/pti: Unbreak EFI old_memmap Greg Kroah-Hartman
2018-01-15 12:35 ` [PATCH 4.14 091/118] x86/Documentation: Add PTI description Greg Kroah-Hartman
2018-01-15 12:35 ` [PATCH 4.14 092/118] x86/cpufeatures: Add X86_BUG_SPECTRE_V[12] Greg Kroah-Hartman
2018-01-15 12:35 ` [PATCH 4.14 093/118] sysfs/cpu: Add vulnerability folder Greg Kroah-Hartman
2018-01-15 12:35 ` [PATCH 4.14 094/118] x86/cpu: Implement CPU vulnerabilites sysfs functions Greg Kroah-Hartman
2018-01-15 12:35 ` [PATCH 4.14 095/118] x86/tboot: Unbreak tboot with PTI enabled Greg Kroah-Hartman
2018-01-15 12:35 ` [PATCH 4.14 096/118] x86/mm/pti: Remove dead logic in pti_user_pagetable_walk*() Greg Kroah-Hartman
2018-01-15 12:35 ` [PATCH 4.14 097/118] x86/cpu/AMD: Make LFENCE a serializing instruction Greg Kroah-Hartman
2018-01-15 12:35 ` [PATCH 4.14 098/118] x86/cpu/AMD: Use LFENCE_RDTSC in preference to MFENCE_RDTSC Greg Kroah-Hartman
2018-01-15 12:35 ` [PATCH 4.14 099/118] sysfs/cpu: Fix typos in vulnerability documentation Greg Kroah-Hartman
2018-01-15 12:35 ` [PATCH 4.14 100/118] x86/alternatives: Fix optimize_nops() checking Greg Kroah-Hartman
2018-01-15 12:35 ` [PATCH 4.14 101/118] x86/pti: Make unpoison of pgd for trusted boot work for real Greg Kroah-Hartman
2018-01-15 12:35 ` [PATCH 4.14 102/118] objtool: Detect jumps to retpoline thunks Greg Kroah-Hartman
2018-01-15 12:35 ` [PATCH 4.14 103/118] objtool: Allow alternatives to be ignored Greg Kroah-Hartman
2018-01-15 12:35 ` [PATCH 4.14 104/118] x86/retpoline: Add initial retpoline support Greg Kroah-Hartman
2018-01-15 12:35 ` [PATCH 4.14 105/118] x86/spectre: Add boot time option to select Spectre v2 mitigation Greg Kroah-Hartman
2018-01-15 12:35 ` [PATCH 4.14 106/118] x86/retpoline/crypto: Convert crypto assembler indirect jumps Greg Kroah-Hartman
2018-01-15 12:35 ` [PATCH 4.14 107/118] x86/retpoline/entry: Convert entry " Greg Kroah-Hartman
2018-01-15 12:35 ` [PATCH 4.14 108/118] x86/retpoline/ftrace: Convert ftrace " Greg Kroah-Hartman
2018-01-15 12:35 ` [PATCH 4.14 109/118] x86/retpoline/hyperv: Convert " Greg Kroah-Hartman
2018-01-15 12:35 ` [PATCH 4.14 110/118] x86/retpoline/xen: Convert Xen hypercall " Greg Kroah-Hartman
2018-01-15 12:35 ` [PATCH 4.14 111/118] x86/retpoline/checksum32: Convert assembler " Greg Kroah-Hartman
2018-01-15 12:35 ` [PATCH 4.14 112/118] x86/retpoline/irq32: " Greg Kroah-Hartman
2018-01-15 12:35 ` [PATCH 4.14 113/118] x86/retpoline: Fill return stack buffer on vmexit Greg Kroah-Hartman
2018-01-15 12:35 ` [PATCH 4.14 114/118] selftests/x86: Add test_vsyscall Greg Kroah-Hartman
2018-01-15 12:35 ` [PATCH 4.14 115/118] x86/pti: Fix !PCID and sanitize defines Greg Kroah-Hartman
2018-01-15 12:35 ` [PATCH 4.14 116/118] security/Kconfig: Correct the Documentation reference for PTI Greg Kroah-Hartman
2018-01-15 12:35   ` Greg Kroah-Hartman
2018-01-15 12:35   ` Greg Kroah-Hartman
2018-01-15 12:35 ` [PATCH 4.14 117/118] x86,perf: Disable intel_bts when PTI Greg Kroah-Hartman
2018-01-15 12:35 ` [PATCH 4.14 118/118] x86/retpoline: Remove compile time warning Greg Kroah-Hartman
2018-01-15 15:24 ` [PATCH 4.14 000/118] 4.14.14-stable review Holger Hoffstätte
2018-01-15 18:02   ` Greg Kroah-Hartman
2018-01-15 18:02     ` Greg Kroah-Hartman
2018-01-15 16:04 ` Alan J. Wylie
2018-01-15 17:40   ` Greg Kroah-Hartman
2018-01-16 11:50     ` Alan J. Wylie
2018-01-15 16:28 ` kernelci.org bot
2018-01-15 22:11 ` Dan Rue
2018-01-16  5:53   ` Greg Kroah-Hartman
2018-01-16 14:30 ` Guenter Roeck
2018-01-16 14:57   ` Greg Kroah-Hartman
2018-01-16 18:08 ` Shuah Khan
2018-01-16 20:50   ` Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180115123416.396412523@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=jgg@mellanox.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=swise@opengridcomputing.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.