Hi, this patch changes the err_out case in st_open to decrement STp->in_use 
under the st_dev_arr_lock.

I'm just basing this on looking at the code (I didn't run into an actual 
problem here), but it seems like the right thing to do; st_open and release 
hold the lock when adjusting in_use in other places.

This is against kernel 2.6.12-rc2.

Nate Dailey
Stratus Technologies


Signed-off-by: Nate Dailey <[EMAIL PROTECTED]>


--- linux-2.6.12-rc2/drivers/scsi/st.c.orig     2005-04-20 11:28:39.000000000 
-0400
+++ linux-2.6.12-rc2/drivers/scsi/st.c  2005-04-20 11:30:08.000000000 -0400
@@ -1115,7 +1115,9 @@ static int st_open(struct inode *inode, 
 
  err_out:
        normalize_buffer(STp->buffer);
+       write_lock(&st_dev_arr_lock);
        STp->in_use = 0;
+       write_unlock(&st_dev_arr_lock);
        scsi_device_put(STp->device);
        return retval;
 

-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to