[libcamera-devel] [PATCH 2/3] libcamera: pipeline: rkisp1: Assert empty queuedRequests before clearing frameInfo

Niklas Söderlund niklas.soderlund at ragnatech.se
Wed Apr 14 16:07:36 CEST 2021


Hi Nícolas,

Thanks for your patch.

On 2021-04-06 15:23:34 -0300, Nícolas F. R. A. Prado wrote:
> Assert that there are no queued requests before clearing the frameInfo,
> otherwise a SEGFAULT can occur.
> 
> This issue happened while running lc-compliance.
> 
> Suggested-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
> Signed-off-by: Nícolas F. R. A. Prado <nfraprado at collabora.com>

Reviewed-by: Niklas Söderlund <niklas.soderlund at ragnatech.se>

> ---
>  src/libcamera/pipeline/rkisp1/rkisp1.cpp | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
> index c122c9be2afd..3c8d9dfe6f87 100644
> --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp
> +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
> @@ -842,6 +842,7 @@ void PipelineHandlerRkISP1::stop(Camera *camera)
>  		LOG(RkISP1, Warning)
>  			<< "Failed to stop parameters for " << camera->id();
>  
> +	ASSERT(data->queuedRequests_.empty());
>  	data->frameInfo_.clear();
>  
>  	freeBuffers(camera);
> -- 
> 2.31.1
> 

-- 
Regards,
Niklas Söderlund


More information about the libcamera-devel mailing list