projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.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
|
blame
|
history
diff --git
a/fs/afs/cell.c
b/fs/afs/cell.c
index 788865df1bc92689debaf1545c59fe6ab48d2ea8..584bb0f9c36a35cdd5ed4234a83ba927e0d04e5e 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;
}