Bug 140646 - There is an issue with sg_open in RHEL 3.0 U4 .
There is an issue with sg_open in RHEL 3.0 U4 .
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: kernel (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Doug Ledford
Depends On:
  Show dependency treegraph
Reported: 2004-11-23 18:43 EST by Heather Conway
Modified: 2007-11-30 17:07 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-12-03 18:39:38 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
patch to sg_opn for RHEL 3.0 U4 (1.92 KB, patch)
2004-11-23 18:44 EST, Heather Conway
no flags Details | Diff

  None (edit)
Description Heather Conway 2004-11-23 18:43:02 EST
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET 
CLR 1.0.3705)

Description of problem:
Per the PowerPath team:
The current change to the sg driver in RH3.0 update 4 is buggy and is 
preventing the qualification of PowerPath with update4. 

The issue is in sg_open. When obtaining the request queue spinlock, 
we suggest spin_lock_irq/spin_unlock_irq should be changed to 
spin_lock_irqsave/spin_unlock_irqrestore. Not doing so, improperly 
restores the interrupt mask on the local CPU, and may cause the 
process to be interrupted, when in fact interrupts were disabled by a 
prior spinlock_irq_save on another lock. The result is a deadlock. 

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
The issue is in sg_open. 

Additional info:
Comment 1 Heather Conway 2004-11-23 18:44:13 EST
Created attachment 107355 [details]
patch to sg_opn for RHEL 3.0 U4
Comment 3 Doug Ledford 2004-11-26 08:57:18 EST
What spin lock is being held while calling sg_open?
Comment 4 Heather Conway 2004-12-02 17:11:38 EST
Per the PowerPath team: "A spinlock specific to the Powerpath base 
driver is being held around the call to sg_open."
Does that help or do you need further information?
Comment 5 Doug Ledford 2004-12-03 15:32:02 EST
Ugh.  OK, tell them to fix their code.  The sg_open() call is in the
open() syscall chain, is intended for user space use, and is a
function that can sleep.  Holding a spinlock around this is *NOT*
allowed.  The only lock that should ever be held on entry to this
function is the BKL, and that's a lock exception where
sleeping/preemption is allowed.  The use of spin_lock_irq and
unlock_irq is perfectly safe/correct when the function is called
properly.  Calling sg_open with a spin lock held is going to break
horribly on RHEL4 and is broken but we don't spit out BUG()'s on RHEL3.
Comment 6 Heather Conway 2004-12-06 16:34:27 EST
Thanks Doug.  I will relay the information to the PowerPath team and 
will let you know if there are any additional questions.
Comment 8 Tom Coughlan 2005-01-28 11:24:43 EST
Just in case anyone runs in to this problem: The issue will be fixed
in the next version of PowerPath. EMC is also preparing a hot fix for
the current version if PowerPath.  Contact EMC customer suppport. 
Comment 9 Heather Conway 2005-04-08 11:23:37 EDT
PowerPath 4.3.2 b011 is being released on April 11, 2005.

Note You need to log in before you can comment on or make changes to this bug.