From: Leon Romanovsky <leon@kernel.org>
To: Jakub Kicinski <kuba@kernel.org>
Cc: davem@davemloft.net, netdev@vger.kernel.org, edumazet@google.com,
pabeni@redhat.com, Jonathan Lemon <bsd@meta.com>,
jacob.e.keller@intel.com
Subject: Re: [PATCH net-next] genetlink: fix policy dump for dumps
Date: Wed, 9 Nov 2022 20:59:09 +0200 [thread overview]
Message-ID: <Y2v4fVbvUdZ80A9E@unreal> (raw)
In-Reply-To: <Y2vnesR4cNMVF4Jn@unreal>
On Wed, Nov 09, 2022 at 07:46:34PM +0200, Leon Romanovsky wrote:
> On Tue, Nov 08, 2022 at 12:40:41PM -0800, Jakub Kicinski wrote:
> > Jonathan reports crashes when running net-next in Meta's fleet.
>
> I experience these crashes too.
>
> > Stats collection uses ethtool -I which does a per-op policy dump
> > to check if stats are supported. We don't initialize the dumpit
> > information if doit succeeds due to evaluation short-circuiting.
> >
> > The crash may look like this:
> >
> > BUG: kernel NULL pointer dereference, address: 0000000000000cc0
> > RIP: 0010:netlink_policy_dump_add_policy+0x174/0x2a0
> > ctrl_dumppolicy_start+0x19f/0x2f0
> > genl_start+0xe7/0x140
> >
> > Or we may trigger a warning:
> >
> > WARNING: CPU: 1 PID: 785 at net/netlink/policy.c:87 netlink_policy_dump_get_policy_idx+0x79/0x80
> > RIP: 0010:netlink_policy_dump_get_policy_idx+0x79/0x80
> > ctrl_dumppolicy_put_op+0x214/0x360
> >
> > depending on what garbage we pick up from the stack.
> >
> > Reported-by: Jonathan Lemon <bsd@meta.com>
> > Fixes: 26588edbef60 ("genetlink: support split policies in ctrl_dumppolicy_put_op()")
> > Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> > ---
> > CC: jacob.e.keller@intel.com
> > ---
> > net/netlink/genetlink.c | 12 ++++++------
> > 1 file changed, 6 insertions(+), 6 deletions(-)
>
> I added your updated patch to my CI run. Unfortunately, the regression
> system is overloaded due to nightly regression so won't be able to get
> results in sensible time frame.
>
Thanks,
Tested-by: Leon Romanovsky <leonro@nvidia.com>
next prev parent reply other threads:[~2022-11-09 18:59 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-08 20:40 [PATCH net-next] genetlink: fix policy dump for dumps Jakub Kicinski
2022-11-08 20:47 ` Keller, Jacob E
2022-11-08 23:44 ` Jakub Kicinski
2022-11-08 23:49 ` Keller, Jacob E
2022-11-09 17:46 ` Leon Romanovsky
2022-11-09 18:59 ` Leon Romanovsky [this message]
2022-11-09 20:11 ` Jakub Kicinski
2022-11-10 2:42 ` Saeed Mahameed
2022-11-10 6:00 ` Leon Romanovsky
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=Y2v4fVbvUdZ80A9E@unreal \
--to=leon@kernel.org \
--cc=bsd@meta.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jacob.e.keller@intel.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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).