Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Loic Poulain <loic.poulain@linaro.org>
To: davem@davemloft.net, kuba@kernel.org
Cc: johannes@sipsolutions.net, netdev@vger.kernel.org,
ryazanov.s.a@gmail.com, Loic Poulain <loic.poulain@linaro.org>,
stable@vger.kernel.org
Subject: [PATCH] wwan: core: Fix missing RTM_NEWLINK event for default link
Date: Thu, 22 Jul 2021 20:21:05 +0200 [thread overview]
Message-ID: <1626978065-5239-1-git-send-email-loic.poulain@linaro.org> (raw)
A wwan link created via the wwan_create_default_link procedure is
never notified to the user (RTM_NEWLINK), causing issues with user
tools relying on such event to track network links (NetworkManager).
This is because the procedure misses a call to rtnl_configure_link(),
which sets the link as initialized and notifies the new link (cf
proper usage in __rtnl_newlink()).
Cc: stable@vger.kernel.org
Fixes: ca374290aaad ("wwan: core: support default netdev creation")
Suggested-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
---
drivers/net/wwan/wwan_core.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/wwan/wwan_core.c b/drivers/net/wwan/wwan_core.c
index 3e16c31..674a81d 100644
--- a/drivers/net/wwan/wwan_core.c
+++ b/drivers/net/wwan/wwan_core.c
@@ -984,6 +984,8 @@ static void wwan_create_default_link(struct wwan_device *wwandev,
goto unlock;
}
+ rtnl_configure_link(dev, NULL); /* Link initialized, notify new link */
+
unlock:
rtnl_unlock();
--
2.7.4
next reply other threads:[~2021-07-22 18:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-22 18:21 Loic Poulain [this message]
2021-07-22 18:35 ` Sergey Ryazanov
2021-07-23 16:20 ` 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=1626978065-5239-1-git-send-email-loic.poulain@linaro.org \
--to=loic.poulain@linaro.org \
--cc=davem@davemloft.net \
--cc=johannes@sipsolutions.net \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=ryazanov.s.a@gmail.com \
--cc=stable@vger.kernel.org \
--subject='Re: [PATCH] wwan: core: Fix missing RTM_NEWLINK event for default link' \
/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
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).