projects
/
platform
/
kernel
/
linux-exynos.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0bdd5ca
)
aio: table lookup: verify ctx pointer
author
Benjamin LaHaise
<bcrl@kvack.org>
Wed, 7 Aug 2013 22:23:48 +0000
(18:23 -0400)
committer
Benjamin LaHaise
<bcrl@kvack.org>
Wed, 7 Aug 2013 22:23:48 +0000
(18:23 -0400)
Another shortcoming of the table lookup patch was revealed where the pointer
was not being tested before being dereferenced. Verify this to avoid the
NULL pointer dereference.
Signed-off-by: Benjamin LaHaise <bcrl@kvack.org>
fs/aio.c
patch
|
blob
|
history
diff --git
a/fs/aio.c
b/fs/aio.c
index
3bc068c
..
c3f005d
100644
(file)
--- a/
fs/aio.c
+++ b/
fs/aio.c
@@
-812,7
+812,7
@@
static struct kioctx *lookup_ioctx(unsigned long ctx_id)
goto out;
ctx = table->table[id];
- if (ctx->user_id == ctx_id) {
+ if (ctx
&& ctx
->user_id == ctx_id) {
percpu_ref_get(&ctx->users);
ret = ctx;
}