projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5563935
)
hwrng: core - Fix double unlock in rng_dev_read
author
Herbert Xu
<herbert@gondor.apana.org.au>
Wed, 23 Dec 2009 15:22:34 +0000
(23:22 +0800)
committer
Herbert Xu
<herbert@gondor.apana.org.au>
Wed, 23 Dec 2009 15:22:34 +0000
(23:22 +0800)
When the loop terminates with size == 0 in rng_dev_read we will
unlock the rng mutex twice.
Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/char/hw_random/core.c
patch
|
blob
|
history
diff --git
a/drivers/char/hw_random/core.c
b/drivers/char/hw_random/core.c
index e989f67bb61f14b84fd66f90f1a87008ff9117dc..3d9c61e5acbf2adb354a70e0a8ba532568ef06d0 100644
(file)
--- a/
drivers/char/hw_random/core.c
+++ b/
drivers/char/hw_random/core.c
@@
-158,10
+158,11
@@
static ssize_t rng_dev_read(struct file *filp, char __user *buf,
goto out;
}
}
-out_unlock:
- mutex_unlock(&rng_mutex);
out:
return ret ? : err;
+out_unlock:
+ mutex_unlock(&rng_mutex);
+ goto out;
}