Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1e52b08a authored by Vinayak Menon's avatar Vinayak Menon Committed by Gerrit - the friendly Code Review server
Browse files

drivers: dma-buf: replace dma_buf_put with fput in free_proc



free_proc does a dma_buf_put to free the reference taken by
get_dma_info. But get_dma_info takes the reference using get_file.
This causes the dma-buf-ref code to save stack references only on
put and thus dma_buf_ref_show shows incorrect total references.

Change-Id: Ib7c7599c13a9e0875bda06925da4191fe3ed8cc7
Signed-off-by: default avatarVinayak Menon <vinmenon@codeaurora.org>
parent c153c0af
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1320,7 +1320,7 @@ static void free_proc(struct dma_proc *proc)
	struct dma_info *tmp, *n;

	list_for_each_entry_safe(tmp, n, &proc->dma_bufs, head) {
		dma_buf_put(tmp->dmabuf);
		fput(tmp->dmabuf->file);
		list_del(&tmp->head);
		kfree(tmp);
	}