#9729 NORM 1.5-fir: Race condition in SDHCI driver

Zarro Boogs per Child bugtracker at laptop.org
Sat Nov 21 19:16:43 EST 2009


#9729: Race condition in SDHCI driver
---------------------------------+------------------------------------------
 Reporter:  wmb at firmworks.com    |                 Owner:  wmb at firmworks.com  
     Type:  defect               |                Status:  new                
 Priority:  normal               |             Milestone:  1.5-firmware-C1-SMT
Component:  ofw - open firmware  |               Version:  not specified      
 Keywords:                       |           Next_action:  code               
 Verified:  0                    |   Deployment_affected:                     
Blockedby:                       |              Blocking:                     
---------------------------------+------------------------------------------
 OFW's SDHCI driver has a race condition that can cause a data transfer
 interrupt notification to be cleared before later code has a chance to
 process it.  This condition was noticed while single-stepping through the
 "wait" routine.  I haven't seen evidence of it triggering in normal
 operation, but in principle it could happen, if for example an interrupt
 happened just at the wrong time during execution of "wait".

 The problem is that "wait" clears all events that are pending, not just
 the ones that it is looking for at the moment.  If, when waiting for
 command complete, the data transfer complete status bit is also set when
 the command complete status is observed, both will be cleared, and the
 subsequent "wait for data tranfer complete" step will never see the data
 transfer complete status.

-- 
Ticket URL: <http://dev.laptop.org/ticket/9729>
One Laptop Per Child <http://laptop.org/>
OLPC bug tracking system


More information about the Bugs mailing list