Re: [PATCH for v5.8] vicodec: add missing v4l2_ctrl_request_hdl_put()

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

 



On 12/08/2020 21:53, Ezequiel Garcia wrote:
> On Wed, 12 Aug 2020 at 07:30, Hans Verkuil <hverkuil@xxxxxxxxx> wrote:
>>
>> The check for a required control in the request was missing a call to
>> v4l2_ctrl_request_hdl_put(), so the control request object was never
>> released.
>>
>> Signed-off-by: Hans Verkuil <hverkuil-cisco@xxxxxxxxx>
>> Fixes: 997deb811bf5 ("media: vicodec: Add support for stateless decoder.")
> 
> Reviewed-by: Ezequiel Garcia <ezequiel@xxxxxxxxxxxxx>
> 
> Seems there's a similar leak in cedrus_request_validate error path,
> when v4l2_ctrl_request_hdl_ctrl_find fails.

Correct. Will you make a patch for that?

Regards,

	Hans

> 
> Cheers,
> Ezequiel
> 
>> ---
>> diff --git a/drivers/media/test-drivers/vicodec/vicodec-core.c b/drivers/media/test-drivers/vicodec/vicodec-core.c
>> index 8941d73f6611..71928e30dae8 100644
>> --- a/drivers/media/test-drivers/vicodec/vicodec-core.c
>> +++ b/drivers/media/test-drivers/vicodec/vicodec-core.c
>> @@ -1994,6 +1994,7 @@ static int vicodec_request_validate(struct media_request *req)
>>         }
>>         ctrl = v4l2_ctrl_request_hdl_ctrl_find(hdl,
>>                                                vicodec_ctrl_stateless_state.id);
>> +       v4l2_ctrl_request_hdl_put(hdl);
>>         if (!ctrl) {
>>                 v4l2_info(&ctx->dev->v4l2_dev,
>>                           "Missing required codec control\n");




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux