lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 26 Feb 2019 22:24:54 -0600
From:   "Gustavo A. R. Silva" <>
To:     Cliff Whickman <>, Robin Holt <>,
        Arnd Bergmann <>,
        Greg Kroah-Hartman <>
Cc:, Kees Cook <>
Subject: [sgi-xp] Missing break or false positive?

Hi all,

I'm taking a look into the following piece of code in drivers/misc/sgi-xp/xpc_uv.c:

 562                 struct xpc_activate_mq_msg_chctl_opencomplete_uv *msg;
 564                 if (!part_setup)
 565                         break;
 567                 msg = container_of(msg_hdr, struct
 568                                 xpc_activate_mq_msg_chctl_opencomplete_uv, hdr);
 569                 spin_lock_irqsave(&part->chctl_lock, irq_flags);
 570                 part->chctl.flags[msg->ch_number] |= XPC_CHCTL_OPENCOMPLETE;
 571                 spin_unlock_irqrestore(&part->chctl_lock, irq_flags);
 573                 xpc_wakeup_channel_mgr(part);
 574         }

and I'm trying to figure out if the following warning is due to a missing break
at the end of the case, or if this is just a false positive and a /* fall through */
annotation should be added:

drivers/misc/sgi-xp/xpc_uv.c: In function ‘xpc_handle_activate_mq_msg_uv’:
drivers/misc/sgi-xp/xpc_uv.c:573:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
drivers/misc/sgi-xp/xpc_uv.c:575:2: note: here

The piece of code above was introduced by the following commit in 2009:


The cases are pretty similar, and the fact that this code was introduced
in the middle of the switch statement and not at the end or the beginning,
leads me to believe that this is a false positive.  On the other hand,
all the other cases end with a break or a return but this one.  So, I
better ask your opinions about this.


Powered by blists - more mailing lists