From: Nate Dailey <nhdailey@verizon.net>
To: Kai.Makisara@kolumbus.fi
Cc: linux-scsi@vger.kernel.org
Subject: [PATCH] drivers/scsi/st.c: decrement in_use under the lock in st_open
Date: Thu, 21 Apr 2005 10:08:31 -0500 (CDT) [thread overview]
Message-ID: <31176667.1114096111445.JavaMail.root@vms064.mailsrvcs.net> (raw)
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 <nate.dailey@stratus.com>
--- 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;
next reply other threads:[~2005-04-21 15:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-21 15:08 Nate Dailey [this message]
2005-04-21 16:40 ` [PATCH] drivers/scsi/st.c: decrement in_use under the lock in st_open Kai Makisara
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=31176667.1114096111445.JavaMail.root@vms064.mailsrvcs.net \
--to=nhdailey@verizon.net \
--cc=Kai.Makisara@kolumbus.fi \
--cc=linux-scsi@vger.kernel.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.