OSDN Git Service
(root)
/
uclinux-h8
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0e81a8a
)
afs: add missing up_write() on return
author
Sven Schnelle
<svens@stackframe.org>
Wed, 2 Apr 2008 12:17:18 +0000
(13:17 +0100)
committer
Linus Torvalds
<torvalds@linux-foundation.org>
Wed, 2 Apr 2008 14:40:54 +0000
(07:40 -0700)
If afs_cell_alloc() fails, afs_cells_sem doesn't get unlocked, which
leads to a deadlock. Unlock it before returning.
Signed-off-by: Sven Schnelle <svens@stackframe.org>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/afs/cell.c
patch
|
blob
|
history
diff --git
a/fs/afs/cell.c
b/fs/afs/cell.c
index
788865d
..
584bb0f
100644
(file)
--- a/
fs/afs/cell.c
+++ b/
fs/afs/cell.c
@@
-138,6
+138,7
@@
struct afs_cell *afs_cell_create(const char *name, char *vllist)
cell = afs_cell_alloc(name, vllist);
if (IS_ERR(cell)) {
_leave(" = %ld", PTR_ERR(cell));
+ up_write(&afs_cells_sem);
return cell;
}