qemu-block
[Top][All Lists]
Advanced

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

Re: [Qemu-block] [PATCH 1/7] curl: strengthen assertion in curl_clean_st


From: Max Reitz
Subject: Re: [Qemu-block] [PATCH 1/7] curl: strengthen assertion in curl_clean_state
Date: Wed, 10 May 2017 18:33:24 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0

On 10.05.2017 16:31, Paolo Bonzini wrote:
> curl_clean_state should only be called after all AIOCBs have been
> completed.  This is not so obvious for the call from curl_detach_aio_context,
> so assert that.
> 
> Cc: address@hidden
> Cc: address@hidden
> Signed-off-by: Paolo Bonzini <address@hidden>
> ---
>  block/curl.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/block/curl.c b/block/curl.c
> index 2708d57c2f..25a301e7b4 100644
> --- a/block/curl.c
> +++ b/block/curl.c
> @@ -532,6 +532,11 @@ static CURLState *curl_init_state(BlockDriverState *bs, 
> BDRVCURLState *s)
>  
>  static void curl_clean_state(CURLState *s)
>  {
> +    int j;
> +    for (j=0; j<CURL_NUM_ACB; j++) {

See checkpatch output, but apart from that:

Reviewed-by: Max Reitz <address@hidden>

> +        assert(!s->acb[j]);
> +    }
> +
>      if (s->s->multi)
>          curl_multi_remove_handle(s->s->multi, s->curl);
>  
> 


Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]