From: Imre Deak Date: Fri, 19 Apr 2013 01:11:56 +0000 (+1000) Subject: drm: prime: fix refcounting on the dmabuf import error path X-Git-Tag: omap-for-v3.10/dt-fixes-for-merge-window~55^2~9 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=011c2282c74db120f01a8414edc66c3f217f5511;p=pandora-kernel.git drm: prime: fix refcounting on the dmabuf import error path In commit be8a42ae60 we inroduced a refcount problem, where on the drm_gem_prime_fd_to_handle() error path we'll call dma_buf_put() for self imported dma buffers. Fix this by taking a reference on the dma buffer in the .gem_import hook instead of assuming the caller had taken one. Besides fixing the bug this is also more logical. Signed-off-by: Imre Deak Cc: stable@vger.kernel.org Reviewed-by: Daniel Vetter Signed-off-by: Dave Airlie --- Reading git-diff-tree failed