Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 145857 Details for
Bug 223087
qla4xxx: mutex_lock needs to be released before sleep() in qla4xxx_mailbox_command
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
fix a potential lock up in qla4xxx_mailbox_command()
patch.mbox2961 (text/plain), 2.25 KB, created by
David Somayajulu
on 2007-01-17 20:34:43 UTC
(
hide
)
Description:
fix a potential lock up in qla4xxx_mailbox_command()
Filename:
MIME Type:
Creator:
David Somayajulu
Created:
2007-01-17 20:34:43 UTC
Size:
2.25 KB
patch
obsolete
>diff -uarp linux-2.6.18.noarch/drivers/scsi/qla4xxx/ql4_mbx.c linux-2.6.18.noarch.mbox/drivers/scsi/qla4xxx/ql4_mbx.c >--- linux-2.6.18.noarch/drivers/scsi/qla4xxx/ql4_mbx.c 2007-01-08 23:34:11.000000000 -0800 >+++ linux-2.6.18.noarch.mbox/drivers/scsi/qla4xxx/ql4_mbx.c 2007-01-16 23:05:01.000000000 -0800 >@@ -31,16 +31,30 @@ int qla4xxx_mailbox_command(struct scsi_ > unsigned long flags = 0; > DECLARE_WAITQUEUE(wait, current); > >- mutex_lock(&ha->mbox_sem); >- >- /* Mailbox code active */ >- set_bit(AF_MBOX_COMMAND, &ha->flags); >- > /* Make sure that pointers are valid */ > if (!mbx_cmd || !mbx_sts) { > DEBUG2(printk("scsi%ld: %s: Invalid mbx_cmd or mbx_sts " > "pointer\n", ha->host_no, __func__)); >- goto mbox_exit; >+ return status; >+ } >+ >+ /* Mailbox code active */ >+ wait_count = MBOX_TOV * 100; >+ >+ while (wait_count--) { >+ mutex_lock(&ha->mbox_sem); >+ if (!test_bit(AF_MBOX_COMMAND, &ha->flags)) { >+ set_bit(AF_MBOX_COMMAND, &ha->flags); >+ mutex_unlock(&ha->mbox_sem); >+ break; >+ } >+ mutex_unlock(&ha->mbox_sem); >+ if (!wait_count) { >+ DEBUG2(printk("scsi%ld: %s: mbox_sem failed\n", >+ ha->host_no, __func__)); >+ return status; >+ } >+ msleep(10); > } > > /* To prevent overwriting mailbox registers for a command that has >@@ -155,9 +169,10 @@ int qla4xxx_mailbox_command(struct scsi_ > spin_unlock_irqrestore(&ha->hardware_lock, flags); > > mbox_exit: >+ mutex_lock(&ha->mbox_sem); > clear_bit(AF_MBOX_COMMAND, &ha->flags); >- clear_bit(AF_MBOX_COMMAND_DONE, &ha->flags); > mutex_unlock(&ha->mbox_sem); >+ clear_bit(AF_MBOX_COMMAND_DONE, &ha->flags); > > return status; > } >diff -uarp linux-2.6.18.noarch/drivers/scsi/qla4xxx/ql4_version.h linux-2.6.18.noarch.mbox/drivers/scsi/qla4xxx/ql4_version.h >--- linux-2.6.18.noarch/drivers/scsi/qla4xxx/ql4_version.h 2007-01-08 23:34:11.000000000 -0800 >+++ linux-2.6.18.noarch.mbox/drivers/scsi/qla4xxx/ql4_version.h 2007-01-16 23:15:53.000000000 -0800 >@@ -5,9 +5,9 @@ > * See LICENSE.qla4xxx for copyright and licensing details. > */ > >-#define QLA4XXX_DRIVER_VERSION "5.00.05b9-k" >+#define QLA4XXX_DRIVER_VERSION "5.00.07-k1_rhel5" > > #define QL4_DRIVER_MAJOR_VER 5 > #define QL4_DRIVER_MINOR_VER 0 >-#define QL4_DRIVER_PATCH_VER 5 >-#define QL4_DRIVER_BETA_VER 9 >+#define QL4_DRIVER_PATCH_VER 7 >+#define QL4_DRIVER_BETA_VER 0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 223087
: 145857