public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Sergey Ryazanov <ryazanov.s.a@gmail.com>
To: Loic Poulain <loic.poulain@oss.qualcomm.com>,
	Johannes Berg <johannes@sipsolutions.net>
Cc: Andrew Lunn <andrew+netdev@lunn.ch>,
	Eric Dumazet <edumazet@google.com>,
	"David S . Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	netdev@vger.kernel.org, Slark Xiao <slark_xiao@163.com>,
	Daniele Palmas <dnlplm@gmail.com>
Subject: [RFC PATCH 0/1] prevent premature device unregister via
Date: Thu,  8 Jan 2026 04:05:17 +0200	[thread overview]
Message-ID: <20260108020518.27086-1-ryazanov.s.a@gmail.com> (raw)
In-Reply-To: <63fddbfb.60e7.19b975c40ea.Coremail.slark_xiao@163.com>

Initially I was unable to hit or reproduce the issue with hwsim since it
unregister the WWAN device ops as a last step effectively holding the
WWAN device when all the regular WWAN ports are already removed. Thanks
to the detiled report of Daniele and the fix proposed by Loic, it became
obvious what a releasing sequence leads to the crash.

With WWAN device ops unregistration done first in hwsim, I was able to
easily reproduce the WWAN device premature unregister, and develop
another fix avoiding a dummy port allocation and relying on a reference
counting. See details in the RFC patch.

Loic, what do you think about this way of the users tracking?

Slark, if you would like to go with the proposed patch, just remove the
patch #7 from the series and insert the proposed patch between between
#1 and #2. Of if you prefer, I can reassemble the whole series and send
it as RFC v5.

CC: Slark Xiao <slark_xiao@163.com>
CC: Daniele Palmas <dnlplm@gmail.com>

-- 
2.52.0

  parent reply	other threads:[~2026-01-08  2:05 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-05 10:20 [net-next v4 0/8] net: wwan: add NMEA port type support Slark Xiao
2026-01-05 10:20 ` [net-next v4 1/8] net: wwan: core: remove unused port_id field Slark Xiao
2026-01-05 10:20 ` [net-next v4 2/8] net: wwan: core: split port creation and registration Slark Xiao
2026-01-06 16:49   ` Sai Krishna Gajula
2026-01-07  7:21     ` Slark Xiao
2026-01-08  0:42       ` Sergey Ryazanov
2026-01-05 10:20 ` [net-next v4 3/8] net: wwan: core: split port unregister and stop Slark Xiao
2026-01-06 20:34   ` Loic Poulain
2026-01-05 10:20 ` [net-next v4 4/8] net: wwan: add NMEA port support Slark Xiao
2026-01-06 20:36   ` Loic Poulain
2026-01-05 10:20 ` [net-next v4 5/8] net: wwan: hwsim: refactor to support more port types Slark Xiao
2026-01-05 10:20 ` [net-next v4 6/8] net: wwan: hwsim: support NMEA port emulation Slark Xiao
2026-01-06 20:37   ` Loic Poulain
2026-01-05 10:20 ` [net-next v4 7/8] net: wwan: prevent premature device unregister when NMEA port is present Slark Xiao
2026-01-07  1:06   ` Sergey Ryazanov
2026-01-07  7:29     ` Slark Xiao
2026-01-07 10:24       ` Sergey Ryazanov
2026-01-08  2:05       ` Sergey Ryazanov [this message]
2026-01-08  2:05         ` [RFC PATCH 1/1] net: wwan: core: explicit WWAN device reference counting Sergey Ryazanov
2026-01-08  8:59           ` Loic Poulain
2026-01-08 13:01             ` Sergey Ryazanov
2026-01-08 11:01         ` Re:[RFC PATCH 0/1] prevent premature device unregister via Slark Xiao
2026-01-08 13:12           ` Sergey Ryazanov
2026-01-05 10:20 ` [net-next v4 8/8] net: wwan: mhi_wwan_ctrl: Add NMEA channel support Slark Xiao
2026-01-06 20:38   ` Loic Poulain

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=20260108020518.27086-1-ryazanov.s.a@gmail.com \
    --to=ryazanov.s.a@gmail.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=dnlplm@gmail.com \
    --cc=edumazet@google.com \
    --cc=johannes@sipsolutions.net \
    --cc=kuba@kernel.org \
    --cc=loic.poulain@oss.qualcomm.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=slark_xiao@163.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