summaryrefslogtreecommitdiff
path: root/kernel/cred.c
diff options
context:
space:
mode:
authorAl Viro <viro@ZenIV.linux.org.uk>2012-03-07 05:16:35 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-03-19 09:02:18 -0700
commit00a1b4bfdec249286c6ed902773dd8699ae070d7 (patch)
tree16f6acd817d1ca7942822588a7524935d629501a /kernel/cred.c
parent46bf2e14af13fece62ff6f4f294f6658578f1600 (diff)
downloadlwn-00a1b4bfdec249286c6ed902773dd8699ae070d7.tar.gz
lwn-00a1b4bfdec249286c6ed902773dd8699ae070d7.zip
aio: fix io_setup/io_destroy race
commit 86b62a2cb4fc09037bbce2959d2992962396fd7f upstream. Have ioctx_alloc() return an extra reference, so that caller would drop it on success and not bother with re-grabbing it on failure exit. The current code is obviously broken - io_destroy() from another thread that managed to guess the address io_setup() would've returned would free ioctx right under us; gets especially interesting if aio_context_t * we pass to io_setup() points to PROT_READ mapping, so put_user() fails and we end up doing io_destroy() on kioctx another thread has just got freed... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Acked-by: Benjamin LaHaise <bcrl@kvack.org> Reviewed-by: Jeff Moyer <jmoyer@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel/cred.c')
0 files changed, 0 insertions, 0 deletions