HI Greg,
Thanks, I will resend the relevant patch in proper way.
Thanks,
~Saurav
-Original Message-
From: Greg KH [mailto:gre...@linuxfoundation.org]
Sent: Friday, July 19, 2013 9:11 PM
To: Saurav Kashyap
Cc: jbottom...@parallels.com; sta...@vger.kernel.org; Giridhar Malavali; Andrew
Va
HI James,
Yes, agreed. I will resend the relevant patch set.
Thanks,
~Saurav
-Original Message-
From: James Bottomley [mailto:jbottom...@parallels.com]
Sent: Friday, July 19, 2013 8:14 PM
To: Saurav Kashyap
Cc: Giridhar Malavali; Andrew Vasquez; linux-scsi
Subject: Re: [PATCH 1/2] qla2xx
A race condition may happen if two threads are both trying to open the same sg
with O_EXCL simultaneously. It's possible that they both find fsds list is
empty and get_exclude(sdp) returns 0, then they both call set_exclude() and
break out from wait_event_interruptible and resume open.
Now use rws
Open exclusive check is protected by o_sem, no need sg_open_exclusive_lock.
@exclude is used to record which type of rwsem we are holding.
Signed-off-by: Vaughan Cao
---
drivers/scsi/sg.c | 34 +-
1 file changed, 5 insertions(+), 29 deletions(-)
diff --git a/driv
Push file descriptor list locking down to per-device locking. Let sg_index_lock
only protect device lookup.
sdp->detached is also set and checked with this lock held.
Changes from v4:
* Since I use ERR_PTR and friends in sg_add_sfp, this patch should also be
updated to resolve conflict in cherrry
@detached is set under the protection of sg_index_lock. Without getting the
lock, new sfp will be added during sg removal and there is no chance for it
to be picked out. So check with sg_index_lock held in sg_add_sfp().
Changes from v4:
* use ERR_PTR series instead of adding another parameter in
There is a race when open sg with O_EXCL flag. Also a race may happen between
sg_open and sg_remove.
Changes from v4:
* [3/4] use ERR_PTR series instead of adding another parameter in sg_add_sfp
* [4/4] fix conflict for cherry-pick from v3.
Changes from v3:
* release o_sem in sg_release(), not
Push file descriptor list locking down to per-device locking. Let sg_index_lock
only protect device lookup.
sdp->detached is also set and checked with this lock held.
Changes from v4:
* Since I use ERR_PTR and friends in sg_add_sfp, this patch should also be
updated to resolve conflict in cherrry
@detached is set under the protection of sg_index_lock. Without getting the
lock, new sfp will be added during sg removal and there is no chance for it
to be picked out. So check with sg_index_lock held in sg_add_sfp().
Changes from v4:
* use ERR_PTR series instead of adding another parameter in
9 matches
Mail list logo