lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20090811095845.16943.54345.stgit@ES-J7S4D2J.amer.consind.ge.com>
Date:	Tue, 11 Aug 2009 11:01:38 +0100
From:	Martyn Welch <martyn.welch@...anuc.com>
To:	gregkh@...e.de
Cc:	devel@...uxdriverproject.org, linux-kernel@...r.kernel.org,
	jirislaby@...il.com
Subject: [PATCH] Staging: vme: Add syncronize interrupts before removing
	callback

As identified by Jiri, there is no syncronisation before callback is removed.

Signed-off-by: Martyn Welch <martyn.welch@...anuc.com>
---

Jiri: Thanks once again. The pointer is checked before it is called, but I guess
their is a slim chance that we could try to jump to a null pointer, so this probably
makes sense.


 drivers/staging/vme/bridges/vme_tsi148.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/drivers/staging/vme/bridges/vme_tsi148.c b/drivers/staging/vme/bridges/vme_tsi148.c
index cdc2919..e4bf430 100644
--- a/drivers/staging/vme/bridges/vme_tsi148.c
+++ b/drivers/staging/vme/bridges/vme_tsi148.c
@@ -480,6 +480,7 @@ int tsi148_request_irq(int level, int statid,
 void tsi148_free_irq(int level, int statid)
 {
 	u32 tmp;
+	struct pci_dev pdev;
 
 	/* Get semaphore */
 	down(&(vme_irq));
@@ -495,6 +496,10 @@ void tsi148_free_irq(int level, int statid)
 		tmp = ioread32be(tsi148_bridge->base + TSI148_LCSR_INTEO);
 		tmp &= ~TSI148_LCSR_INTEO_IRQEO[level - 1];
 		iowrite32be(tmp, tsi148_bridge->base + TSI148_LCSR_INTEO);
+
+		pdev = container_of(tsi148_bridge->parent, struct pci_dev, dev);
+
+		synchronize_irq(pdev->irq);
 	}
 
 	tsi148_bridge->irq[level - 1].callback[statid].func = NULL;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ