Bug 140646 - There is an issue with sg_open in RHEL 3.0 U4 .
Summary: There is an issue with sg_open in RHEL 3.0 U4 .
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: kernel   
(Show other bugs)
Version: 3.0
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Doug Ledford
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2004-11-23 23:43 UTC by Heather Conway
Modified: 2007-11-30 22:07 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-12-03 23:39:38 UTC
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 23:44 UTC, Heather Conway
no flags Details | Diff

Description Heather Conway 2004-11-23 23:43:02 UTC
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 23:44:13 UTC
Created attachment 107355 [details]
patch to sg_opn for RHEL 3.0 U4

Comment 3 Doug Ledford 2004-11-26 13:57:18 UTC
What spin lock is being held while calling sg_open?

Comment 4 Heather Conway 2004-12-02 22:11:38 UTC
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 20:32:02 UTC
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 21:34:27 UTC
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 16:24:43 UTC
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 15:23:37 UTC
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.