diff options
| author | Souptick Joarder <[email protected]> | 2020-09-27 17:08:04 +0200 |
|---|---|---|
| committer | Mauro Carvalho Chehab <[email protected]> | 2021-03-22 17:31:58 +0100 |
| commit | 16a5dcf7fbc2f5cd10c1e6264262bfa3832fb7d5 (patch) | |
| tree | 6c80124dd0424c026399b621ceda4a08d2dc7248 /tools/perf/scripts/python/export-to-postgresql.py | |
| parent | 491a0b208b15978c2bde9eb1a6b77a5e0eb55ad0 (diff) | |
media: atomisp: Fixed error handling path
Inside alloc_user_pages() based on flag value either pin_user_pages()
or get_user_pages_fast() will be called. However, these API might fail.
But free_user_pages() called in error handling path doesn't bother
about return value and will try to unpin bo->pgnr pages, which is
incorrect.
Fix this by passing the page_nr to free_user_pages(). If page_nr > 0
pages will be unpinned based on bo->mem_type. This will also take care
of non error handling path.
allocation")
Link: https://lore.kernel.org/linux-media/[email protected]
Fixes: 14a638ab96c5 ("media: atomisp: use pin_user_pages() for memory
Signed-off-by: Souptick Joarder <[email protected]>
Cc: John Hubbard <[email protected]>
Cc: Ira Weiny <[email protected]>
Reviewed-by: Dan Carpenter <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions