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

Re: [PATCH] domain: try to address Coverity pointing out a missing "break" in domain_teardown()


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 8 Sep 2021 12:32:50 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=1D/OwiwFXsedKdK1yUIbJBrg4OkseZXV1iXwOcwtd38=; b=C+K4p6kg1fgMS6/HiZKKsqh04Lbfc9Ghcon3YYVixJORZCMxjEI8Y7thrcG8XqmaKCw/GdPdCGbrpvirS14kRqHeP2qKFIcG64so0vZFvk3yktOqfUUSToaGPWGEOw9gjyV5q782CLHuUf5XgTlj3Hv+N0VhfiIo2CmU0wnCi8A0rJNqDHOwJHPFbvY2Xca1UGTlJffj/M1eamXNzIgBkmx1o0t++nx7oDDf/mmWsGBSag+nlaQ4e3JjNEdmNnU+a468pJW5AL93BpNCR5Cwb2zKt/QaycSSryQp6MSGxRRscZJA8wZhRcEdiFCThBULR1bfJp2VjU2s1MQWEXwjQw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=f6XlWOjzltmSlPLlSdBRHV0LnqHFx+4WW4rWZWnapkqGPJ76MvoBcG3ZiNOwGNsgGxmO+hTdGO0CIbadcLZtElJ0SLfvoBBc21yBGltytrf9Jb+XZ6bIeT/oiFws70VmDTxt1wUQrGcbSDyIVpZh9lhZnWN3HmTsEs7MMquHKY+cXtUl+rDSEuz3JKwM+QLcIXkPiMVgv6J4HoPvh3c0aHsUKrYpUyT6MmOClM5Ydyu9zsxM0KZfjB4oRXbWlbJScVcDWulxpQ6eqVZHlNVHpNEe4OEqlou46JwpDrjCJLZ9hCJPX/jO2DNMu+3OowvHzv1XyIu+i+0mquIk0T7kxg==
  • Authentication-results: xen.org; dkim=none (message not signed) header.d=none;xen.org; dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Wed, 08 Sep 2021 10:33:11 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 01.09.2021 10:45, Jan Beulich wrote:
> Commit 806448806264 ("xen/domain: Fix label position in
> domain_teardown()" has caused Coverity to report a _new_ supposedly
> un-annotated fall-through in a switch(). I find this (once again)
> puzzling; I'm having an increasingly hard time figuring what patterns
> the tool is actually after. I would have expected that the tool would
> either have spotted an issue also before this change, or not at all. Yet
> if it had spotted one before, the statistics report should have included
> an eliminated instance alongside the new one (because then the issue
> would simply have moved by a few lines).
> 
> Hence the only thing I could guess is that the treatment of comments in
> macro expansions might be subtly different. Therefore try whether
> switching the comments to the still relatively new "fallthrough" pseudo
> keyword actually helps.
> 
> Coverity-ID: 1490865
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
> ---
> If this doesn't help, I'm afraid I'm lost as to what Coverity means us
> to do to silence the reporting.

According to the most recent report this did not help. Shall I
revert the change? Or do we consider it a step towards using the
pseudo keyword more uniformly?

Jan

> --- a/xen/common/domain.c
> +++ b/xen/common/domain.c
> @@ -401,13 +401,13 @@ static int domain_teardown(struct domain
>           */
>  #define PROGRESS(x)                             \
>          d->teardown.val = PROG_ ## x;           \
> -        /* Fallthrough */                       \
> +        fallthrough;                            \
>      case PROG_ ## x
>  
>  #define PROGRESS_VCPU(x)                        \
>          d->teardown.val = PROG_vcpu_ ## x;      \
>          d->teardown.vcpu = v;                   \
> -        /* Fallthrough */                       \
> +        fallthrough;                            \
>      case PROG_vcpu_ ## x:                       \
>          v = d->teardown.vcpu
>  
> 
> 




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.