From: Svetlana Mavrina Date: Sun, 12 Jan 2014 11:56:09 +0000 (+0000) Subject: RDMA/amso1100: Add check if cache memory was allocated before freeing it X-Git-Tag: v3.14-rc1~103^2~1^5~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d9d5713ca628dc211d8b4a1da5fb9e0cfe592b92;p=pandora-kernel.git 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: Svetlana Mavrina Reviewed-by: Alexey Khoroshilov Signed-off-by: Roland Dreier --- Reading git-diff-tree failed