mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-04 10:56:06 -04:00
Staging: atomisp: fix locking in alloc_user_pages()
We call this function with the lock held and should also return with the lock held as well. This one error path is not-consistent because we should return without the lock held. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
08dcded491
commit
af4fd0e7a4
@@ -1011,6 +1011,7 @@ static int alloc_user_pages(struct hmm_buffer_object *bo,
|
||||
dev_err(atomisp_dev, "find_vma failed\n");
|
||||
atomisp_kernel_free(bo->page_obj);
|
||||
atomisp_kernel_free(pages);
|
||||
mutex_lock(&bo->mutex);
|
||||
return -EFAULT;
|
||||
}
|
||||
mutex_lock(&bo->mutex);
|
||||
|
||||
Reference in New Issue
Block a user