summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/cxgbi/libcxgbi.h
diff options
context:
space:
mode:
authorAnish Bhatt2014-09-16 02:44:18 +0200
committerJames Bottomley2014-10-01 19:40:22 +0200
commit078efae00ffc76381c3248006e9cf0988163488f (patch)
tree59f80cbdbd8f9468c1594eef93f89f90926060b7 /drivers/scsi/cxgbi/libcxgbi.h
parentLinux 3.17-rc1 (diff)
downloadkernel-qcow2-linux-078efae00ffc76381c3248006e9cf0988163488f.tar.gz
kernel-qcow2-linux-078efae00ffc76381c3248006e9cf0988163488f.tar.xz
kernel-qcow2-linux-078efae00ffc76381c3248006e9cf0988163488f.zip
[SCSI] cxgb4i: avoid holding mutex in interrupt context
cxgbi_inet6addr_handler() can be called in interrupt context, so use rcu protected list while finding netdev. This is observed as a scheduling in atomic oops when running over ipv6. Fixes: fc8d0590d914 ("libcxgbi: Add ipv6 api to driver") Fixes: 759a0cc5a3e1 ("cxgb4i: Add ipv6 code to driver, call into libcxgbi ipv6 api") Signed-off-by: Anish Bhatt <anish@chelsio.com> Signed-off-by: Karen Xie <kxie@chelsio.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/cxgbi/libcxgbi.h')
-rw-r--r--drivers/scsi/cxgbi/libcxgbi.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/scsi/cxgbi/libcxgbi.h b/drivers/scsi/cxgbi/libcxgbi.h
index b3e6e7541cc5..1d98fad6a0ab 100644
--- a/drivers/scsi/cxgbi/libcxgbi.h
+++ b/drivers/scsi/cxgbi/libcxgbi.h
@@ -527,6 +527,7 @@ struct cxgbi_ports_map {
#define CXGBI_FLAG_IPV4_SET 0x10
struct cxgbi_device {
struct list_head list_head;
+ struct list_head rcu_node;
unsigned int flags;
struct net_device **ports;
void *lldev;
@@ -709,6 +710,8 @@ void cxgbi_device_unregister(struct cxgbi_device *);
void cxgbi_device_unregister_all(unsigned int flag);
struct cxgbi_device *cxgbi_device_find_by_lldev(void *);
struct cxgbi_device *cxgbi_device_find_by_netdev(struct net_device *, int *);
+struct cxgbi_device *cxgbi_device_find_by_netdev_rcu(struct net_device *,
+ int *);
int cxgbi_hbas_add(struct cxgbi_device *, u64, unsigned int,
struct scsi_host_template *,
struct scsi_transport_template *);