Commit a9bd958a authored by Muli Ben-Yehuda's avatar Muli Ben-Yehuda Committed by Linus Torvalds

[PATCH] fix trident.c lockup on module load 2.6.0-test2

This patch fixes a kernel lockup with 2.6.0-test2 when the trident.c
OSS driver is loaded and the driver attempts to initialize the
card. The problem is that in ali_ac97_get() we lock the card->lock
spinlock, but never release it on the good path, only on the error
path. This patch adds the missing spin_unlock_irqrestore().

This bug snuck in in a 2.4 sync from Alan, and 2.4 appears to suffer
from the same problem.  A patch for that will be send to Marcelo
momentarily.
parent 95e8022b
...@@ -3017,6 +3017,8 @@ static u16 ali_ac97_get(struct trident_card *card, int secondary, u8 reg) ...@@ -3017,6 +3017,8 @@ static u16 ali_ac97_get(struct trident_card *card, int secondary, u8 reg)
} }
data = inl(TRID_REG(card, address)); data = inl(TRID_REG(card, address));
spin_unlock_irqrestore(&card->lock, flags);
return ((u16) (data >> 16)); return ((u16) (data >> 16));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment