Article View: linux.kernel.netdev
Article #24229Re: [PATCH net v3 2/2] net: wwan: iosm: re-bind the driver when the modem rebooted during S3
From: "Maciej S. Szmigiero"
Date: Sun, 29 Nov 2026 19:03
Date: Sun, 29 Nov 2026 19:03
68 lines
13673 bytes
13673 bytes
On 28.11.2026 17:07, David Westen wrote: > On 28.11.2026 16:04, Maciej S. Szmigiero wrote: >> I think for the issue at hand (S3 suspend/resume) currently the cleanest >> and less intrusive solution is to unbind/rebind the driver as the >> hibernation path already does. > > Thanks, that helps. Just to make sure I read it right: do you mean > unbinding before S3, as v2 did and as hibernation does, or v3's > re-bind after resume once the modem is detected as rebooted? I meant going back to how your earlier patch titled "fix S3 resume by re-binding the driver around it" did it. As I wrote previously, I think that the alternative attempt to detect whether the modem survived the S3 cycle in this patch is just too complicated and intrusive in comparison to simply adding S3 case to existing unbind/re-bind functionality that the aforementioned earlier patch attempted. I think that any effort is better spent fixing the bugs you describe in the next paragraph. > I'd prefer the latter. Unbinding before S3 runs the cleanup against a > modem that is still running, so every suspend with traffic hits the > cleanup bugs we discussed: with a strict IOMMU that's DMA faults, and > without one the modem writes into freed memory. These are the bugs I think should (eventually) be fixed. > Hibernation has the > same exposure, but it runs far less often than S3. That depends on what the user prefers - hibernating their machine or putting it into S3. > After resume, the > modem has lost power and holds none of the driver's memory, so the > cleanup can't hit those bugs. Yeah, but then there are issues with iosm code touching dead modem requiring introducing "IOSM_MODEM_GONE" bit in this patch. And also this won't help the "rmmod iosm" case. So fixing the cleanup done on suspend with modem still live would still be the preferred option. > v4 would drop the checks from v3 and keep only the detection on resume > and the re-bind after it, plus one check that stops doorbells to the > rebooted modem until the re-bind. In my testing without it, a doorbell > from the old driver instance crashed the rebooted modem into CD_READY > again. > >> However, these fixes should go in separate patches from the S3 fix, >> maybe even into separate patch series. > > Agreed, the teardown fixes will be a separate series. > Patch 1 is the one exception: the re-bind hits that use-after-free on > every S3 with wwan0 up, so I'd keep it first in this series. If you'd > rather have it sent on its own, I can do that. Sure, if it makes sense to include certain fix in the S3 fix series then no problem with that. > Thanks, > David Thanks, Maciej
Technical Details
Message-ID:
<27177991-fd89-456b-a440-a56a616fdc02@maciej.szmigiero.name>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-373659-linux-kernel-netdev=dewy.ruReferences:
<20261126194143.32283-1-davidlwesten@gmail.com> <20261126194143.32283-3-davidlwesten@gmail.com> <fd2a9a0a-106e-467b-acd0-7045410305e3@maciej.szmigiero.name> <DN659J3QCZRL.2PU3PICXJW6K9@gmail.com> <26f19a1f-8f60-4402-afc8-96fe46611998@maciej.szmigiero.name> <DN6Z1WC3K6J5.28NE37T8TYXAZ@gmail.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-373659-linux-kernel-netdev=dewy.ru
From: mail@maciej.szmigiero.name ("Maciej S. Szmigiero")
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net v3 2/2] net: wwan: iosm: re-bind the driver when the
modem rebooted during S3
Date: Sun, 29 Nov 2026 20:03:18 +0100
Organization: Usenet Network
Sender: mhej@vps-ovh.mhejs.net
Message-ID: <27177991-fd89-456b-a440-a56a616fdc02@maciej.szmigiero.name>
References: <20261126194143.32283-1-davidlwesten@gmail.com>
<20261126194143.32283-3-davidlwesten@gmail.com>
<fd2a9a0a-106e-467b-acd0-7045410305e3@maciej.szmigiero.name>
<DN659J3QCZRL.2PU3PICXJW6K9@gmail.com>
<26f19a1f-8f60-4402-afc8-96fe46611998@maciej.szmigiero.name>
<DN6Z1WC3K6J5.28NE37T8TYXAZ@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: usenet.network;
logging-data="1241705"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:zWCSh2ZapoYTRYlm1UIpJJsqwsU= sha256:dkssoKBAR6O2VejMbVKatkQ/DjECsjEdahjup/Cdd5I=
sha1:ZmFOqiUo6YuVu5r4jVHDpG13Dss= sha256:jh2O3E79TV4xopigPAWopujdX7YMjtjantqv4nt/kw4=
Content-Language: en-US, pl-PL
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
by mail.dewy.ru (Postfix) with ESMTP id 0BC01125FAC; Sun, 29 Nov 2026 22:03:50 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -2.951
X-Spam-Status: No, score=-2.951 tagged_above=-9999 required=6.31
tests=[DCC_REPUT_70_89=0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249,
MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Received: from mail.dewy.ru ([127.0.0.1])
by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id lQWNHX3mHr-y;
Sun, 29 Nov 2026 22:03:46 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-373659-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=maciej.szmigiero.name
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
by mail.dewy.ru (Postfix) with ESMTPS id F0EB9125FAA; Sun, 29 Nov 2026 22:03:42 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
by sea.lore.kernel.org (Postfix) with ESMTP id 15BC3218B4; Sun, 29 Nov 2026 19:03:39 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
t=1795979018;
b=Y41CQVvvqQF6icDphrMJRpMvl7cKu9dn7sYD5z5O8fOqAQmTXtbrVUhnKNcY7l16LcKa
gB7X5objsSMkrYdqdDjafzCGu2nVboyeAowa8OSNe70KsxKRJukZtAdhkPD77ztZocZU0
XwNtuFLOdCdc+Hm9OB6pJFxmwv4BA+7C/SLhc6n8cATfxOcC8PifLT2TXgfzmozlXmlcJ
JXL4TWe1n2oki3c0txGq07voFIYHJ0zUWPhQGrm6ZlYeHwRjeUEXr14STfzMo95PvIwuw
L7rzAkjR9NCcH/GO1egEDJ9sTObDPpNPoAKcE7YheDcEAJa3uzTQpx3Yx/DuD+apZtw==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1795979018;
h=X-Original-To:Received:DMARC-Filter:Received:Message-ID:Date:
X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
List-Unsubscribe:List-Owner:Precedence:MIME-Version:User-Agent:
Subject:To:Cc:References:Content-Language:From:Autocrypt:
Disposition-Notification-To:In-Reply-To:Content-Type:
Content-Transfer-Encoding:Sender;
bh=g+yY4KTsyt8qS2aDX9dCFeSdVfAsaL244VtvICfbmGQ=;
b=PYrgW2boPMsb3hT16HMhbKVmT8qmLfISGXsZ1Hq9NHDuEND/8rOU11Pz2foGgQKbE9FK
UcuLKxtMc9AjNzmD9uye4zt5mfh55vV8XDvgfOWMvrv+H9I/wp5/UcaaqbjtWLxXW1WFc
Vc2jyjj9nlPlLu/b/O6cA3zv9QFxi61WVlXEYkMw7LcnQXfZPJVaicEm4u/a9qdLoGXjw
eXLkX9SUOabqOUmwDkMZVkGtInZpTnmrH2JvEyk/sae9aUi9Ni5kQ4lxN9VZ7fjpx3gLE
aIKxwDy1tzl8zmzh9HY2Pngd3E1VsX/0qUiLiaSrvU0PoH+MMbMe6sM7y0tuNN4RPWA==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org;
dmarc=none header.from=maciej.szmigiero.name;
spf=pass smtp.mailfrom=vps-ovh.mhejs.net;
arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 97FEC606A32C;
Sun, 29 Nov 2026 19:03:38 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=145.239.82.108
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
t=1795979018;
b=F9RzdJ6p7qPmBLdbHuOjuw5KyxJnsnXiI0Mj09V70bTz57rOjXxsHVPviC7klgHkPBZk
wJX3Xo90ntQkBQm3JZ3VQMl5yLVT0ada06qUCg0Gxe1tSVBa1baGKfIuGxbcrwEiDKJnj
htIC3Rg15+qKvvGHXbcdCpHCg7P6vzy3bqfknbS/B93kYvAUHX53rHDu4aUZ1XgmKFqbu
CpbcPjrsdJXbMY+GuV0HIWS1CWvlGCmYQS1xmeGye5OO2fnHiLDLs9RZeofk+tWGO1F+V
Yt9KiaDrlpi2fZrcPg/xg67Np5fuYcVfP9qnLel7psGsuZxHgfE7ZymFnK4SCH+DoEQ==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1795979018;
h=DMARC-Filter:Received:Message-ID:Date:MIME-Version:User-Agent:
Subject:To:Cc:References:Content-Language:From:Autocrypt:
Disposition-Notification-To:In-Reply-To:Content-Type:
Content-Transfer-Encoding:Sender;
bh=g+yY4KTsyt8qS2aDX9dCFeSdVfAsaL244VtvICfbmGQ=;
b=Ntpiyf4BwGCujPwL8z8lhALRQOZcCkDlIU/GBH/DClZQrff3HeEHQLGGmlz658CFa4Cp
Z4Cw8rQdh9dGy8w4oy5RQMK8I5h5X7oefefqj6CecyFSEHmhZMTDIy+gzbAb6Hh/a3H78
GthZhh230sxPfAV2cRoJxNItjyZ11ClXmM2DkoWVUfy7+N0t1aAzg+jFg5HTXfF3IVyf/
L3mBXWPyNhMaFt6EoxT+sx7OGPBv+SWmmSgqIZG//1nerfX7Q/UkYFLSBRn9Zw8X2uUH8
+IJEBS1tPnOPNtMHsYO8Ag2YjK58eYrpCbkPQ60eSFCnyIILY7ntKl8iYzl7mU9Xvcw==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
dmarc=none header.from=maciej.szmigiero.name;
spf=pass smtp.mailfrom=vps-ovh.mhejs.net;
arc=none smtp.remote-ip=145.239.82.108
X-Received: from vps-ovh.mhejs.net (vps-ovh.mhejs.net [145.239.82.108])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4FAD9606A323
for <netdev@vger.kernel.org>; Sun, 29 Nov 2026 19:03:35 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 4FAD9606A323
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=maciej.szmigiero.name
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=vps-ovh.mhejs.net
X-Received: from MUA
by vps-ovh.mhejs.net with esmtpsa (TLS1.3) tls TLS_AES_128_GCM_SHA256
(Exim 4.100.1)
(envelope-from <mhej@vps-ovh.mhejs.net>)
id 1xXkBI-00000001Nkf-0EGI;
Sun, 29 Nov 2026 20:03:24 +0100
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list
X-User-Agent: Mozilla Thunderbird
X-Cc: netdev@vger.kernel.org, Loic Poulain <loic.poulain@oss.qualcomm.com>,
Sergey Ryazanov <ryazanov.s.a@gmail.com>,
Johannes Berg <johannes@sipsolutions.net>,
Andrew Lunn <andrew+netdev@lunn.ch>, "David S. Miller"
<davem@davemloft.net>, Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
X-Autocrypt: addr=mail@maciej.szmigiero.name; keydata=
xsFNBFpGusUBEADXUMM2t7y9sHhI79+2QUnDdpauIBjZDukPZArwD+sDlx5P+jxaZ13XjUQc
6oJdk+jpvKiyzlbKqlDtw/Y2Ob24tg1g/zvkHn8AVUwX+ZWWewSZ0vcwp7u/LvA+w2nJbIL1
N0/QUUdmxfkWTHhNqgkNX5hEmYqhwUPozFR0zblfD/6+XFR7VM9yT0fZPLqYLNOmGfqAXlxY
m8nWmi+lxkd/PYqQQwOq6GQwxjRFEvSc09m/YPYo9hxh7a6s8hAP88YOf2PD8oBB1r5E7KGb
Fv10Qss4CU/3zaiyRTExWwOJnTQdzSbtnM3S8/ZO/sL0FY/b4VLtlZzERAraxHdnPn8GgxYk
oPtAqoyf52RkCabL9dsXPWYQjkwG8WEUPScHDy8Uoo6imQujshG23A99iPuXcWc/5ld9mIo/
Ee7kN50MOXwS4vCJSv0cMkVhh77CmGUv5++E/rPcbXPLTPeRVy6SHgdDhIj7elmx2Lgo0cyh
uyxyBKSuzPvb61nh5EKAGL7kPqflNw7LJkInzHqKHDNu57rVuCHEx4yxcKNB4pdE2SgyPxs9
9W7Cz0q2Hd7Yu8GOXvMfQfrBiEV4q4PzidUtV6sLqVq0RMK7LEi0RiZpthwxz0IUFwRw2KS/
9Kgs9LmOXYimodrV0pMxpVqcyTepmDSoWzyXNP2NL1+GuQtaTQARAQ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