linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Nick Desaulniers <ndesaulniers@google.com>
Cc: Trond Myklebust <trond.myklebust@hammerspace.com>,
	Anna Schumaker <anna.schumaker@netapp.com>,
	"Gustavo A . R . Silva" <gustavo@embeddedor.com>,
	Nathan Chancellor <natechancellor@gmail.com>,
	Hongxiang Lou <louhongxiang@huawei.com>,
	Miaohe Lin <linmiaohe@huawei.com>,
	linux-nfs@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
	clang-built-linux <clang-built-linux@googlegroups.com>
Subject: Re: [PATCH v2] nfs: remove incorrect fallthrough label
Date: Thu, 17 Sep 2020 18:36:01 -0700	[thread overview]
Message-ID: <ce5aa7a4881411836f16693a482d756be7bc79ca.camel@perches.com> (raw)
In-Reply-To: <CAKwvOdm84xCFq_KVQcNws2QveJdOM_uRrH9s023Gv8sp8V79JA@mail.gmail.com>

On Thu, 2020-09-17 at 14:41 -0700, Nick Desaulniers wrote:
> On Wed, Sep 16, 2020 at 1:19 PM Joe Perches <joe@perches.com> wrote:
> > On Wed, 2020-09-16 at 13:02 -0700, Nick Desaulniers wrote:
> > > * (call of function with __attribute__(__noreturn__))
> > 
> > I guess panic counts.  I count 11 of those.
> > 
> > Are there any other uses of functions with __noreturn
> > in switch/case label blocks?
> 
> If you look at global_noreturns in tools/objtool/check.c:
>  145   static const char * const global_noreturns[] = {
>  146     "__stack_chk_fail",
>  147     "panic",
>  148     "do_exit",
>  149     "do_task_dead",
>  150     "__module_put_and_exit",
>  151     "complete_and_exit",
>  152     "__reiserfs_panic",
>  153     "lbug_with_loc",
>  154     "fortify_panic",
>  155     "usercopy_abort",
>  156     "machine_real_restart",
>  157     "rewind_stack_do_exit",
>  158     "kunit_try_catch_throw",
>  159   };
> 
> Whether they occur or not at the position you ask; I haven't checked.

Just fyi:

Other than the 11 instances of panic, I found only a
single use of any other function above in a switch/case:

drivers/pnp/pnpbios/core.c:163:			complete_and_exit(&unload_sem, 0);
		case PNP_SYSTEM_NOT_DOCKED:

Found with:

$ grep-2.5.4 -rP --include=*.[ch] -n '\b(?:__stack_chk_fail|panic|do_exit|do_task_dead|__module_put_and_exit|complete_and_exit|__reiserfs_panic|lbug_with_loc|fortify_panic|usercopy_abort|machine_real_restart|rewind_stack_do_exit|kunit_try_catch_throw)\s*(?:\([^\)]*\))?\s*;\s*(case\s+\w+|default)\s*:' *



  reply	other threads:[~2020-09-18  1:36 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-15 22:57 [PATCH] nfs: remove incorrect fallthrough label Nick Desaulniers
2020-09-15 23:29 ` Joe Perches
2020-09-15 23:51   ` Gustavo A. R. Silva
2020-09-16  0:01     ` Gustavo A. R. Silva
2020-09-16  0:33       ` Joe Perches
2020-09-16 20:02   ` [PATCH v2] " Nick Desaulniers
2020-09-16 20:18     ` Gustavo A. R. Silva
2020-09-16 20:19     ` Joe Perches
2020-09-17 21:41       ` Nick Desaulniers
2020-09-18  1:36         ` Joe Perches [this message]
2020-09-17 21:45       ` [PATCH v3] " Nick Desaulniers
2020-09-24 17:19         ` Nick Desaulniers
2020-09-24 17:40           ` Joe Perches
2020-09-24 18:07             ` Joe Perches
2020-09-24 18:11               ` Anna Schumaker
2020-09-25 11:27                 ` Mark Brown
2020-09-24 18:08           ` Gustavo A. R. Silva
2020-09-17  4:35     ` [PATCH v2] " Nathan Chancellor
2020-09-17  6:21 linmiaohe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ce5aa7a4881411836f16693a482d756be7bc79ca.camel@perches.com \
    --to=joe@perches.com \
    --cc=anna.schumaker@netapp.com \
    --cc=clang-built-linux@googlegroups.com \
    --cc=gustavo@embeddedor.com \
    --cc=linmiaohe@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=louhongxiang@huawei.com \
    --cc=natechancellor@gmail.com \
    --cc=ndesaulniers@google.com \
    --cc=trond.myklebust@hammerspace.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).