aio: prevent double free in ioctx_alloc
ioctx_alloc() calls aio_setup_ring() to allocate a ring. If aio_setup_ring() fails to do so it would call aio_free_ring() before returning, but ioctx_alloc() would call aio_free_ring() again causing a double free of the ring. This is easily reproducible from userspace. Signed-off-by: NSasha Levin <sasha.levin@oracle.com> Signed-off-by: NBenjamin LaHaise <bcrl@kvack.org>
Showing
想要评论请 注册 或 登录