Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
misc: fastrpc: Fix double free of 'buf' in error path
commit e8c276d upstream. smatch warning: drivers/misc/fastrpc.c:1926 fastrpc_req_mmap() error: double free of 'buf' In fastrpc_req_mmap() error path, the fastrpc buffer is freed in fastrpc_req_munmap_impl() if unmap is successful. But in the end, there is an unconditional call to fastrpc_buf_free(). So the above case triggers the double free of fastrpc buf. Fixes: 72fa6f7 ("misc: fastrpc: Rework fastrpc_req_munmap") Reviewed-by: Shuah Khan <[email protected]> Reviewed-by: Dan Carpenter <[email protected]> Reviewed-by: Srinivas Kandagatla <[email protected]> Signed-off-by: Sukrut Bellary <[email protected]> Signed-off-by: Srinivas Kandagatla <[email protected]> Cc: stable <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
- Loading branch information