2007-10-29 05:09:43

by Al Viro

[permalink] [raw]
Subject: fix reentrancy bug in arcmsr_get_iop_{r,w}qbuffer()


doh...

Signed-off-by: Al Viro <[email protected]>
---
drivers/scsi/arcmsr/arcmsr_hba.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/arcmsr/arcmsr_hba.c b/drivers/scsi/arcmsr/arcmsr_hba.c
index acbc50f..d466a2d 100644
--- a/drivers/scsi/arcmsr/arcmsr_hba.c
+++ b/drivers/scsi/arcmsr/arcmsr_hba.c
@@ -1095,7 +1095,7 @@ static void arcmsr_iop_message_wrote(struct AdapterControlBlock *acb)

struct QBUFFER __iomem *arcmsr_get_iop_rqbuffer(struct AdapterControlBlock *acb)
{
- static struct QBUFFER __iomem *qbuffer;
+ struct QBUFFER __iomem *qbuffer = NULL;

switch (acb->adapter_type) {

@@ -1116,7 +1116,7 @@ struct QBUFFER __iomem *arcmsr_get_iop_rqbuffer(struct AdapterControlBlock *acb)

static struct QBUFFER __iomem *arcmsr_get_iop_wqbuffer(struct AdapterControlBlock *acb)
{
- static struct QBUFFER __iomem *pqbuffer;
+ struct QBUFFER __iomem *pqbuffer = NULL;

switch (acb->adapter_type) {

--
1.5.3.GIT