projects
/
profile
/
ivi
/
libdrm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
761ffd6
)
Bug #112196: auth.c uses semaphores while holding spinlocks Make spinlocked
author
Rik Faith
<faith@alephnull.com>
Thu, 17 Aug 2000 20:26:11 +0000
(20:26 +0000)
committer
Rik Faith
<faith@alephnull.com>
Thu, 17 Aug 2000 20:26:11 +0000
(20:26 +0000)
region smaller to avoid semaphore.
linux/auth.c
patch
|
blob
|
history
diff --git
a/linux/auth.c
b/linux/auth.c
index
9f81c53
..
4556bd9
100644
(file)
--- a/
linux/auth.c
+++ b/
linux/auth.c
@@
-126,12
+126,12
@@
int drm_getmagic(struct inode *inode, struct file *filp, unsigned int cmd,
if (priv->magic) {
auth.magic = priv->magic;
} else {
- spin_lock(&lock);
do {
+ spin_lock(&lock);
if (!sequence) ++sequence; /* reserve 0 */
auth.magic = sequence++;
+ spin_unlock(&lock);
} while (drm_find_file(dev, auth.magic));
- spin_unlock(&lock);
priv->magic = auth.magic;
drm_add_magic(dev, priv, auth.magic);
}