RDMA/amso1100: Add check if cache memory was allocated before freeing it
There is a path in handle_vq() where kmem_cache_free() can be called with pointer to a local variable. It can happen if vq_repbuf_alloc() failed to allocate memory from cache and req is NULL. The patch adds check if cache memory was allocated before freeing it. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: NSvetlana Mavrina <another.karnil@gmail.com> Reviewed-by: NAlexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by: NRoland Dreier <roland@purestorage.com>
Showing
想要评论请 注册 或 登录