netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Pirko <jiri@resnulli.us>
To: Jakub Kicinski <kuba@kernel.org>
Cc: davem@davemloft.net, netdev@vger.kernel.org, edumazet@google.com,
	pabeni@redhat.com, jacob.e.keller@intel.com, jiri@nvidia.com
Subject: Re: [PATCH net 1/3] devlink: hold region lock when flushing snapshots
Date: Thu, 15 Dec 2022 09:38:15 +0100	[thread overview]
Message-ID: <Y5rc94kpwfvdVL/q@nanopsycho> (raw)
In-Reply-To: <20221215020102.1619685-2-kuba@kernel.org>

Thu, Dec 15, 2022 at 03:01:00AM CET, kuba@kernel.org wrote:
>Netdevsim triggers a splat on reload, when it destroys regions
>with snapshots pending:
>
>  WARNING: CPU: 1 PID: 787 at net/core/devlink.c:6291 devlink_region_snapshot_del+0x12e/0x140
>  CPU: 1 PID: 787 Comm: devlink Not tainted 6.1.0-07460-g7ae9888d6e1c #580
>  RIP: 0010:devlink_region_snapshot_del+0x12e/0x140
>  Call Trace:
>   <TASK>
>   devl_region_destroy+0x70/0x140
>   nsim_dev_reload_down+0x2f/0x60 [netdevsim]
>   devlink_reload+0x1f7/0x360
>   devlink_nl_cmd_reload+0x6ce/0x860
>   genl_family_rcv_msg_doit.isra.0+0x145/0x1c0
>
>This is the locking assert in devlink_region_snapshot_del(),
>we're supposed to be holding the region->snapshot_lock here.
>
>Fixes: 2dec18ad826f ("net: devlink: remove region snapshots list dependency on devlink->lock")
>Signed-off-by: Jakub Kicinski <kuba@kernel.org>

Ooup.

Thanks for the fix.

Reviewed-by: Jiri Pirko <jiri@nvidia.com>

  reply	other threads:[~2022-12-15  8:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-15  2:00 [PATCH net 0/3] devlink: region snapshot locking fix and selftest adjustments Jakub Kicinski
2022-12-15  2:01 ` [PATCH net 1/3] devlink: hold region lock when flushing snapshots Jakub Kicinski
2022-12-15  8:38   ` Jiri Pirko [this message]
2022-12-15  2:01 ` [PATCH net 2/3] selftests: devlink: fix the fd redirect in dummy_reporter_test Jakub Kicinski
2022-12-15  2:01 ` [PATCH net 3/3] selftests: devlink: add a warning for interfaces coming up Jakub Kicinski
2022-12-15 18:42 ` [PATCH net 0/3] devlink: region snapshot locking fix and selftest adjustments Jacob Keller
2022-12-16 10:30 ` patchwork-bot+netdevbpf

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=Y5rc94kpwfvdVL/q@nanopsycho \
    --to=jiri@resnulli.us \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jacob.e.keller@intel.com \
    --cc=jiri@nvidia.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).