From: Steve Best <sbest@redhat.com> Date: Tue, 16 Nov 2010 15:17:02 -0500 Subject: [infiniband] ehea: use shca_list_lock spinlock Message-id: <20101116151156.17393.78517.sendpatchset@squad5-lp1.lab.bos.redhat.com> Patchwork-id: 29455 O-Subject: [PATCH RHEL5.6 BZ613797] IB/ehea: change the spinlock that's being locked to shca_list_lock Bugzilla: 613797 RH-Acked-by: David Howells <dhowells@redhat.com> RH-Acked-by: David S. Miller <davem@redhat.com> RH-Acked-by: Doug Ledford <dledford@redhat.com> RHBZ#: ------ https://bugzilla.redhat.com/show_bug.cgi?id=613797 Description: ------------ For RH-5.5 a fixed was done for #bz 561952 in the interruption code of ehca. That the fix is not completed. In the patch we introduce the shca_list_lock which is used during destroy of an event queue instead of the eq->spinlock. This patch uses the new scha_list_lock. RHEL Version Found: ------------------- RHEL 5.6 kABI Status: ------------ No symbols were harmed. Brew: ----- http://brewweb.devel.redhat.com/brew/taskinfo?taskID=2895033 Upstream Status: ---------------- This patch does not have an upstream equivalent per se. The back port for bz 561952, forgot a small (but important) detail of the patch. This fix adds that detail. The upstream equivalent of the complete fix (including this detail) is commit 9420269428b3dc80c98e52beac60a3976fbef7d2 The mistake is obvious when looking at the attached patch -- the spinlock that's being locked needed to be shca_list_lock. The upstream patch does it right. Test Status: ------------ Joachim Fenkes helped me test this patch. =============================================================== Steve Best IBM on-site partner Proposed Patch: Signed-off-by: Jarod Wilson <jarod@redhat.com> diff --git a/drivers/infiniband/hw/ehca/ehca_eq.c b/drivers/infiniband/hw/ehca/ehca_eq.c index f782681..73de94d 100644 --- a/drivers/infiniband/hw/ehca/ehca_eq.c +++ b/drivers/infiniband/hw/ehca/ehca_eq.c @@ -171,9 +171,9 @@ int ehca_destroy_eq(struct ehca_shca *shca, struct ehca_eq *eq) ibmebus_free_irq(NULL, eq->ist, (void *)shca); - spin_lock_irqsave(&eq->spinlock, flags); + spin_lock_irqsave(&shca_list_lock, flags); eq->is_initialized = 0; - spin_unlock_irqrestore(&eq->spinlock, flags); + spin_unlock_irqrestore(&shca_list_lock, flags); tasklet_kill(&eq->interrupt_task);