+ ieee1394-hl_irqs_lock-is-taken-in-hardware.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     ieee1394: hl_irqs_lock is taken in hardware interrupt context

has been added to the -mm tree.  Its filename is

     ieee1394-hl_irqs_lock-is-taken-in-hardware.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: ieee1394: hl_irqs_lock is taken in hardware interrupt context
From: Stefan Richter <stefanr@xxxxxxxxxxxxxxxxx>


ohci1394 and pcilynx call highlevel_host_reset from their hardware
interrupt handler (via hpsb_selfid_complete).  Therefore all readers and
writers of hl_irqs_lock have to disable interrupts.  Reported by Jiri Slaby
and J.  A.  Magallon.

Signed-off-by: Stefan Richter <stefanr@xxxxxxxxxxxxxxxxx>
Cc: Jody McIntyre <scjody@xxxxxxxxxxxxxx>
Cc: Ben Collins <bcollins@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 drivers/ieee1394/highlevel.c |   27 +++++++++++++++++----------
 1 file changed, 17 insertions(+), 10 deletions(-)

diff -puN drivers/ieee1394/highlevel.c~ieee1394-hl_irqs_lock-is-taken-in-hardware drivers/ieee1394/highlevel.c
--- devel/drivers/ieee1394/highlevel.c~ieee1394-hl_irqs_lock-is-taken-in-hardware	2006-06-06 01:09:41.000000000 -0700
+++ devel-akpm/drivers/ieee1394/highlevel.c	2006-06-06 01:09:41.000000000 -0700
@@ -210,6 +210,8 @@ static int highlevel_for_each_host_reg(s
 
 void hpsb_register_highlevel(struct hpsb_highlevel *hl)
 {
+	unsigned long flags;
+
         INIT_LIST_HEAD(&hl->addr_list);
 	INIT_LIST_HEAD(&hl->host_info_list);
 
@@ -219,9 +221,9 @@ void hpsb_register_highlevel(struct hpsb
         list_add_tail(&hl->hl_list, &hl_drivers);
 	up_write(&hl_drivers_sem);
 
-	write_lock(&hl_irqs_lock);
+	write_lock_irqsave(&hl_irqs_lock, flags);
 	list_add_tail(&hl->irq_list, &hl_irqs);
-	write_unlock(&hl_irqs_lock);
+	write_unlock_irqrestore(&hl_irqs_lock, flags);
 
 	if (hl->add_host)
 		nodemgr_for_each_host(hl, highlevel_for_each_host_reg);
@@ -282,9 +284,11 @@ static int highlevel_for_each_host_unreg
 
 void hpsb_unregister_highlevel(struct hpsb_highlevel *hl)
 {
-	write_lock(&hl_irqs_lock);
+	unsigned long flags;
+
+	write_lock_irqsave(&hl_irqs_lock, flags);
 	list_del(&hl->irq_list);
-	write_unlock(&hl_irqs_lock);
+	write_unlock_irqrestore(&hl_irqs_lock, flags);
 
 	down_write(&hl_drivers_sem);
         list_del(&hl->hl_list);
@@ -517,42 +521,45 @@ void highlevel_remove_host(struct hpsb_h
 
 void highlevel_host_reset(struct hpsb_host *host)
 {
+	unsigned long flags;
         struct hpsb_highlevel *hl;
 
-	read_lock(&hl_irqs_lock);
+	read_lock_irqsave(&hl_irqs_lock, flags);
 	list_for_each_entry(hl, &hl_irqs, irq_list) {
                 if (hl->host_reset)
                         hl->host_reset(host);
         }
-	read_unlock(&hl_irqs_lock);
+	read_unlock_irqrestore(&hl_irqs_lock, flags);
 }
 
 void highlevel_iso_receive(struct hpsb_host *host, void *data, size_t length)
 {
+	unsigned long flags;
         struct hpsb_highlevel *hl;
         int channel = (((quadlet_t *)data)[0] >> 8) & 0x3f;
 
-        read_lock(&hl_irqs_lock);
+        read_lock_irqsave(&hl_irqs_lock, flags);
 	list_for_each_entry(hl, &hl_irqs, irq_list) {
                 if (hl->iso_receive)
                         hl->iso_receive(host, channel, data, length);
         }
-        read_unlock(&hl_irqs_lock);
+        read_unlock_irqrestore(&hl_irqs_lock, flags);
 }
 
 void highlevel_fcp_request(struct hpsb_host *host, int nodeid, int direction,
 			   void *data, size_t length)
 {
+	unsigned long flags;
         struct hpsb_highlevel *hl;
         int cts = ((quadlet_t *)data)[0] >> 4;
 
-        read_lock(&hl_irqs_lock);
+        read_lock_irqsave(&hl_irqs_lock, flags);
 	list_for_each_entry(hl, &hl_irqs, irq_list) {
                 if (hl->fcp_request)
                         hl->fcp_request(host, nodeid, direction, cts, data,
 					length);
         }
-        read_unlock(&hl_irqs_lock);
+        read_unlock_irqrestore(&hl_irqs_lock, flags);
 }
 
 int highlevel_read(struct hpsb_host *host, int nodeid, void *data,
_

Patches currently in -mm which might be from stefanr@xxxxxxxxxxxxxxxxx are

ieee1394-ohci1394c-function-calls-without.patch
ieee1394-sbp2-make-tsb42aa9-workaround-specific.patch
ieee1394-raw1394-fix-whitespace-after-x86_64.patch
ieee1394-ieee1394-ohci1394-cycletoolong.patch
ieee1394-ieee1394-support-for-slow-links-or-slow.patch
ieee1394-ieee1394-save-ram-by-using-a-single.patch
ieee1394-sbp2-remove-manipulation-of-inquiry.patch
ieee1394-sbp2-log-number-of-supported-concurrent.patch
ieee1394-ieee1394-extend-lowlevel-api-for.patch
ieee1394-ohci1394-set-address-range-properties.patch
ieee1394-ohci1394-make-phys_dma-parameter.patch
ieee1394-sbp2-sbp2-remove-ohci1394-specific.patch
ieee1394-sbp2-fix-s800-transfers-if-phys_dma-is.patch
ieee1394-update-feature-removal-of-obsolete.patch
ieee1394-sbp2-provide-helptext-for.patch
ieee1394-sbp2-kconfig-fix.patch
ieee1394-sbp2-use-__attribute__packed-for.patch
ieee1394-speed-up-of-dma_region_sync_for_cpu.patch
ieee1394-sbp2-fix-deregistration-of-status-fifo-address-space.patch
ieee1394-add-preprocessor-constant-for-invalid-csr.patch
ieee1394_core-switch-to-kthread-api.patch
eth1394-endian-fixes.patch
ieee1394-hl_irqs_lock-is-taken-in-hardware.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux