Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 27922b4260f65d317aabda37e42bbbff > files > 2921

kernel-2.6.18-238.el5.src.rpm

From: Chad Dupuis <cdupuis@redhat.com>
Date: Fri, 10 Sep 2010 19:08:34 -0400
Subject: [net] netxen: fix inconsistent lock state
Message-id: <20100910190834.3258.49905.sendpatchset@localhost.localdomain>
Patchwork-id: 28204
O-Subject: [RHEL 5.6 PATCH] netxen: fix inconsistent lock state
Bugzilla: 562937
RH-Acked-by: David S. Miller <davem@redhat.com>

Bugzilla
--------

Bug 562937 (https://bugzilla.redhat.com/show_bug.cgi?id=562937)

Upstream Status
---------------

net-2.6 commit id 4be353d5169ef2477814b35fe46734a51dcecd09

Brew Build
----------

2754304

Testing
-------

The build of this patch was testing against the 2.6.18-219.el5 kernel on top of
the patches from the series "netxen: Update driver to 4.0.73".  The patch was
functionally tested at QLogic.

Description
-----------

>From de64b3d840b2cff674249375865f483f8cd44c65 Mon Sep 17 00:00:00 2001
From: Amit Kumar Salecha <amit.salecha@qlogic.com>
Date: Tue, 17 Aug 2010 20:51:51 +0000
Subject: [PATCH] netxen: fix inconsistent lock state

Spin lock rds_ring->lock is used in poll routine, so other users should
use spin_lock_bh(). While posting rx buffers from netxen_nic_attach,
rds_ring->lock is not required, so cleaning it instead of fixing it by
spin_lock_bh().

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

diff --git a/drivers/net/netxen/netxen_nic_init.c b/drivers/net/netxen/netxen_nic_init.c
index e079f27..33477f5 100644
--- a/drivers/net/netxen/netxen_nic_init.c
+++ b/drivers/net/netxen/netxen_nic_init.c
@@ -1805,8 +1805,6 @@ netxen_post_rx_buffers(struct netxen_adapter *adapter, u32 ringid,
 	netxen_ctx_msg msg = 0;
 	struct list_head *head;
 
-	spin_lock(&rds_ring->lock);
-
 	producer = rds_ring->producer;
 
 	head = &rds_ring->free_list;
@@ -1853,8 +1851,6 @@ netxen_post_rx_buffers(struct netxen_adapter *adapter, u32 ringid,
 					NETXEN_RCV_PRODUCER_OFFSET), msg);
 		}
 	}
-
-	spin_unlock(&rds_ring->lock);
 }
 
 static void