linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jitendra Bhivare <jitendra.bhivare@broadcom.com>
To: Lars-Peter Clausen <lars@metafoo.de>,
	"James E.J. Bottomley" <JBottomley@odin.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>
Cc: Sathya Prakash <sathya.prakash@broadcom.com>,
	Chaitra Basappa <chaitra.basappa@broadcom.com>,
	Suganath Prabu Subramani <suganath-prabu.subramani@broadcom.com>,
	linux-scsi@vger.kernel.org,
	PDL-MPT-FUSIONLINUX <mpt-fusionlinux.pdl@broadcom.com>
Subject: RE: [PATCH resend 1/2] be2iscsi: Remove unnecessary synchronize_irq() before free_irq()
Date: Mon, 7 Mar 2016 07:59:12 +0530	[thread overview]
Message-ID: <50df46ee2ea235f2bd6eba6aa064d151@mail.gmail.com> (raw)
In-Reply-To: <1457086507-5937-1-git-send-email-lars@metafoo.de>

>-----Original Message-----
>From: linux-scsi-owner@vger.kernel.org [mailto:linux-scsi-
>owner@vger.kernel.org] On Behalf Of Lars-Peter Clausen
>Sent: Friday, March 04, 2016 3:45 PM
>To: James E.J. Bottomley; Martin K. Petersen
>Cc: Sathya Prakash; Chaitra P B; Suganath Prabu Subramani; Jitendra
Bhivare;
>linux-scsi@vger.kernel.org; MPT-FusionLinux.pdl@broadcom.com; Lars-Peter
>Clausen
>Subject: [PATCH resend 1/2] be2iscsi: Remove unnecessary
synchronize_irq()
>before free_irq()
>
>Calling synchronize_irq() right before free_irq() is quite useless. On
one hand the
>IRQ can easily fire again before free_irq() is entered, on the other hand
free_irq()
>itself calls synchronize_irq() internally (in a race condition free way),
before any
>state associated with the IRQ is freed.
>
>Patch was generated using the following semantic patch:
>// <smpl>
>@@
>expression irq;
>@@
>-synchronize_irq(irq);
> free_irq(irq, ...);
>// </smpl>
>
>Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
>---
> drivers/scsi/be2iscsi/be_main.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
>diff --git a/drivers/scsi/be2iscsi/be_main.c
b/drivers/scsi/be2iscsi/be_main.c
>index b51e726..e89a0f8d 100644
>--- a/drivers/scsi/be2iscsi/be_main.c
>+++ b/drivers/scsi/be2iscsi/be_main.c
>@@ -5303,15 +5303,12 @@ static void beiscsi_quiesce(struct beiscsi_hba
*phba,
> 	if (phba->msix_enabled) {
> 		for (i = 0; i <= phba->num_cpus; i++) {
> 			msix_vec = phba->msix_entries[i].vector;
>-			synchronize_irq(msix_vec);
> 			free_irq(msix_vec, &phwi_context->be_eq[i]);
> 			kfree(phba->msi_name[i]);
> 		}
> 	} else
>-		if (phba->pcidev->irq) {
>-			synchronize_irq(phba->pcidev->irq);
>+		if (phba->pcidev->irq)
> 			free_irq(phba->pcidev->irq, phba);
>-		}
> 	pci_disable_msix(phba->pcidev);
> 	cancel_delayed_work_sync(&phba->beiscsi_hw_check_task);
>
>--
>2.1.4

Reviewed-by: Jitendra Bhivare <jitendra.bhivare@broadcom.com>

Thanks,

JB

  parent reply	other threads:[~2016-03-07  2:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-04 10:15 [PATCH resend 1/2] be2iscsi: Remove unnecessary synchronize_irq() before free_irq() Lars-Peter Clausen
2016-03-04 10:15 ` [PATCH resend 2/2] mpt3sas: " Lars-Peter Clausen
2016-03-08  2:05   ` Martin K. Petersen
2016-03-09  1:52   ` Martin K. Petersen
2016-03-09 13:26     ` Sreekanth Reddy
2016-03-10  1:43   ` Martin K. Petersen
2016-03-07  2:29 ` Jitendra Bhivare [this message]
2016-03-08  2:07 ` [PATCH resend 1/2] be2iscsi: " Martin K. Petersen
  -- strict thread matches above, loose matches on Subject: below --
2016-02-02 20:02 Lars-Peter Clausen

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=50df46ee2ea235f2bd6eba6aa064d151@mail.gmail.com \
    --to=jitendra.bhivare@broadcom.com \
    --cc=JBottomley@odin.com \
    --cc=chaitra.basappa@broadcom.com \
    --cc=lars@metafoo.de \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=mpt-fusionlinux.pdl@broadcom.com \
    --cc=sathya.prakash@broadcom.com \
    --cc=suganath-prabu.subramani@broadcom.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).