Patch "media: rockchip/rga: Fix a reference count leak." has been added to the 4.19-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    media: rockchip/rga: Fix a reference count leak.

to the 4.19-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     media-rockchip-rga-fix-a-reference-count-leak.patch
and it can be found in the queue-4.19 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 8d0fbf54f3e418c84a52c2f3bcc33d4df9d28087
Author: Qiushi Wu <wu000273@xxxxxxx>
Date:   Sun Jun 14 01:13:49 2020 +0200

    media: rockchip/rga: Fix a reference count leak.
    
    [ Upstream commit 884d638e0853c4b5f01eb6d048fc3b6239012404 ]
    
    pm_runtime_get_sync() increments the runtime PM usage counter even
    when it returns an error code. Thus call pm_runtime_put_noidle()
    if pm_runtime_get_sync() fails.
    
    Fixes: f7e7b48e6d79 ("[media] rockchip/rga: v4l2 m2m support")
    Signed-off-by: Qiushi Wu <wu000273@xxxxxxx>
    Reviewed-by: Heiko Stuebner <heiko@xxxxxxxxx>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xxxxxxxxx>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/media/platform/rockchip/rga/rga-buf.c b/drivers/media/platform/rockchip/rga/rga-buf.c
index 356821c2dacf0..0932f1445deab 100644
--- a/drivers/media/platform/rockchip/rga/rga-buf.c
+++ b/drivers/media/platform/rockchip/rga/rga-buf.c
@@ -89,6 +89,7 @@ static int rga_buf_start_streaming(struct vb2_queue *q, unsigned int count)
 
 	ret = pm_runtime_get_sync(rga->dev);
 	if (ret < 0) {
+		pm_runtime_put_noidle(rga->dev);
 		rga_buf_return_buffers(q, VB2_BUF_STATE_QUEUED);
 		return ret;
 	}



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux