From: Dan Carpenter <error27@gmail.com>
To: Andrew Vasquez <andrew.vasquez-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org>
Cc: linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
kernel-janitors-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
Lalit Chandivade
<lalit.chandivade-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org>,
"James E.J. Bottomley"
<James.Bottomley-l3A5Bk7waGM@public.gmane.org>,
linux-driver-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org,
arun.easi-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org,
Giridhar Malavali
<giridhar.malavali-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org>
Subject: [patch] qla2xxx: locking problem in qla2x00_init_rings()
Date: Sun, 12 Sep 2010 21:40:33 +0000 [thread overview]
Message-ID: <20100912214033.GF25351@bicker> (raw)
IRQs are already disabled here so we don't need to disable them again.
But more importantly, the spin_lock_irqsave() overwrites "flags" and
that breaks things when we want to re-enable the IRQs when we call
spin_unlock_irqrestore(&ha->hardware_lock, flags);
Signed-off-by: Dan Carpenter <error27@gmail.com>
---
This seems like an important bug. I don't have this hardware but could
someone from QLogic test this out and maybe queue it up for 2.6.36?
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index 9c383ba..9f4ba28 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -1787,14 +1787,14 @@ qla2x00_init_rings(scsi_qla_host_t *vha)
qla2x00_init_response_q_entries(rsp);
}
- spin_lock_irqsave(&ha->vport_slock, flags);
+ spin_lock(&ha->vport_slock);
/* Clear RSCN queue. */
list_for_each_entry(vp, &ha->vp_list, list) {
vp->rscn_in_ptr = 0;
vp->rscn_out_ptr = 0;
}
- spin_unlock_irqrestore(&ha->vport_slock, flags);
+ spin_unlock(&ha->vport_slock);
ha->isp_ops->config_rings(vha);
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <error27-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Andrew Vasquez <andrew.vasquez-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org>
Cc: linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
kernel-janitors-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
Lalit Chandivade
<lalit.chandivade-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org>,
"James E.J. Bottomley"
<James.Bottomley-l3A5Bk7waGM@public.gmane.org>,
linux-driver-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org,
arun.easi-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org,
Giridhar Malavali
<giridhar.malavali-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org>
Subject: [patch] qla2xxx: locking problem in qla2x00_init_rings()
Date: Sun, 12 Sep 2010 23:40:33 +0200 [thread overview]
Message-ID: <20100912214033.GF25351@bicker> (raw)
IRQs are already disabled here so we don't need to disable them again.
But more importantly, the spin_lock_irqsave() overwrites "flags" and
that breaks things when we want to re-enable the IRQs when we call
spin_unlock_irqrestore(&ha->hardware_lock, flags);
Signed-off-by: Dan Carpenter <error27-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
This seems like an important bug. I don't have this hardware but could
someone from QLogic test this out and maybe queue it up for 2.6.36?
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index 9c383ba..9f4ba28 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -1787,14 +1787,14 @@ qla2x00_init_rings(scsi_qla_host_t *vha)
qla2x00_init_response_q_entries(rsp);
}
- spin_lock_irqsave(&ha->vport_slock, flags);
+ spin_lock(&ha->vport_slock);
/* Clear RSCN queue. */
list_for_each_entry(vp, &ha->vp_list, list) {
vp->rscn_in_ptr = 0;
vp->rscn_out_ptr = 0;
}
- spin_unlock_irqrestore(&ha->vport_slock, flags);
+ spin_unlock(&ha->vport_slock);
ha->isp_ops->config_rings(vha);
next reply other threads:[~2010-09-12 21:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-12 21:40 Dan Carpenter [this message]
2010-09-12 21:40 ` [patch] qla2xxx: locking problem in qla2x00_init_rings() Dan Carpenter
2010-09-14 23:52 ` Madhu Iyengar
2010-09-14 23:52 ` Madhu Iyengar
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=20100912214033.GF25351@bicker \
--to=error27@gmail.com \
--cc=James.Bottomley-l3A5Bk7waGM@public.gmane.org \
--cc=andrew.vasquez-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org \
--cc=arun.easi-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org \
--cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
--cc=giridhar.malavali-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org \
--cc=kernel-janitors-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=lalit.chandivade-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org \
--cc=linux-driver-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org \
--cc=linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.