[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: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 1 Sep 2021 10:53:42 +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:X-MS-Exchange-SenderADCheck; bh=HQb3lb36j6E87dv80nGPY//1dizzbRcvuL1J6kgjH38=; b=iLXVU6OnweTr+7K1JVNjH7p0ti4CoxZhkMYzaKVB175QQqURLT+/Vy7DQTsF3MKFSFMSgRHp6ApMkeJG6/M4/j33J5FGf8ykaDw8gwlbqO/wL5zUDmj4+5QXdF2ZUMvRKLVBlHrhTBEtobJ8Ralcu30OHWzDOIVy2V3hJeaGOqagZn2Vl7hIPdKLvopxISIvNMq7FQbjbBdGJitFlPWd3i9HBMiOjm+aT30tts5Ipq9Y0yn0+EBV3lxwGuPkHe94BjyiJBm5ECjZ2r1wHwSxJqHSAE/+X5phJoWFk/l59rFs3wvcInwHjT/oxRNMqAuzDzMCZ8l2isNy2Inx2ZujJw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=b4dzlHzFyys8qyCTkFUK+XwBQUjgKRHIuqIzhW0K852SqRbf3m6ZSLyUMMzMyDmdfHTa29FKOAG+n9kcnuYfFp4Tqq6o9r9eABKducresqVyOQ29egu4tnzh2NmltVRY+FRhFlL+aFkYPhhBWC1Z17mdeLic7yBpeNXGVZJaAyckg/4aG/H5cLAcixNLtOe5vvgShxcqyzjSvIe2vSpEA5hdjKVBmCIrBvnrVkoxUAL6BlPDyMaSqh4gT/SKQYyYOXApRu22EaD6sg+0OYdVA9yjsOgxoxhcduUjC/jmRKxidFbq5rjPibfY2OqhiCIZhDRO5t4TSc8w3L4mH2YyDg==
  • Authentication-results: xen.org; dkim=none (message not signed) header.d=none;xen.org; dmarc=none action=none header.from=suse.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, 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, 01 Sep 2021 08:53:52 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 01.09.2021 10:49, Bertrand Marquis wrote:
>> On 1 Sep 2021, at 09:45, Jan Beulich <jbeulich@xxxxxxxx> 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>
> A grep inside Xen code show that we have occurence of:
> /* fallthrough */
> /* Fallthrough */
> falltrough
> Should we actually fix all of them ?

I don't think so, or at least don't view this as urgent. As described
what I'm suspecting here is an issue with such comments living inside
macros. I don't think we have too many instances of such. In case my
guess is right (and hence in case the patch actually helps), we may
want to change all in this much smaller set, but as you say ...

> Anyway this can be in an other patch.

... in a separate patch (not the least because we still need to see
whether the change helps in the first place).

> Reviewed-by: Bertrand Marquis <bertrand.marquis@xxxxxxx>





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