From: Alexey Dobriyan <adobriyan@gmail.com>
To: vvs@virtuozzo.com
Cc: netdev@vger.kernel.org, davem@davemloft.net
Subject: Re: [PATCH v3 01/21] grace: replace BUG_ON by WARN_ONCE in exit_net hook
Date: Tue, 7 Nov 2017 15:26:17 +0300 [thread overview]
Message-ID: <20171107122617.GB2260@avx2> (raw)
> - BUG_ON(!list_empty(grace_list));
> + WARN_ONCE(!list_empty(grace_list),
> + "net %x %s: grace_list is not empty\n",
> + net->ns.inum, __func__);
* printing __func__ is unnecessary as it will be on top of the stacktrace anyway,
* message duplicates condition
* printing netns id in netns ->exit hook also looks like pointless
information: for kernel dumps you want struct net pointer right away.
You wrote admins want to know which container triggered the message
but what will they do with that information?
I'd say WARN_ONCE(!list_empty()) is enough.
BUG_ON if you ship with crashdumps by default.
next reply other threads:[~2017-11-07 12:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-07 12:26 Alexey Dobriyan [this message]
-- strict thread matches above, loose matches on Subject: below --
2017-11-05 16:49 [PATCH v2 00/21] exit_net checks for objects initialized in net_init hook Vasily Averin
[not found] ` <4fdc4264-e338-6ee8-a662-7d98b45733a1-5HdwGun5lf+gSpxsJD1C4w@public.gmane.org>
2017-11-06 13:22 ` [PATCH v3 01/21] grace: replace BUG_ON by WARN_ONCE in exit_net hook Vasily Averin
2017-11-06 20:02 ` J. Bruce Fields
[not found] ` <a059abdd-e727-adcb-7b43-976be1d0a08e-5HdwGun5lf+gSpxsJD1C4w@public.gmane.org>
2017-11-09 15:06 ` J. Bruce Fields
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=20171107122617.GB2260@avx2 \
--to=adobriyan@gmail.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=vvs@virtuozzo.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