Skip to contentSkip to conversation

Patch "wwan: core: Fix missing RTM_NEWLINK event for default link" has been added to the 5.14-stable tree

DISCUSSION Sergey Ryazanov 2 participants 2 messages Sep 15, 2021 – Sep 16, 2021 1 message not in the archive Stable branch

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive

Hello Greg,

looks like the commit 8cc236db1a91 ("wwan: core: Fix missing RTM_NEWLINK event for default link") already included in v5.14, see details below the patch.

Quoted 46 lines · On Wed, Sep 15, 2021 at 3:54 PM <[email protected]> wrote:

This is a note to let you know that I've just added the patch titled

wwan: core: Fix missing RTM_NEWLINK event for default link

to the 5.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
wwan-core-fix-missing-rtm_newlink-event-for-default-link.patch
and it can be found in the queue-5.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

From 8cc236db1a91d0c91651595ba75942a583008455 Mon Sep 17 00:00:00 2001
From: Loic Poulain <[email protected]>
Date: Thu, 22 Jul 2021 20:21:05 +0200
Subject: wwan: core: Fix missing RTM_NEWLINK event for default link

From: Loic Poulain <[email protected]>

commit 8cc236db1a91d0c91651595ba75942a583008455 upstream.

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()).

Fixes ca374290aaad ("wwan: core: support default netdev creation")
---
 drivers/net/wwan/wwan_core.c |    2 ++
 1 file changed, 2 insertions(+)

drivers/net/wwan/wwan_core.c static void wwan_create_default_link(str · line 996

Quoted 7 lines
drivers/net/wwan/wwan_core.c +2 -0
@@ -990,6 +990,8 @@ static void wwan_create_default_link(str
 
        rtnl_configure_link(dev, NULL); /* Link initialized, notify new link */
 
+       rtnl_configure_link(dev, NULL); /* Link initialized, notify new link */
+
 unlock:
        rtnl_unlock();

This change will duplicate the notification call. Fix already in v5.14:

$ git log --oneline v5.14 -- drivers/net/wwan/wwan_core.c
d9d5b8961284 wwan: core: Avoid returning NULL from wwan_create_dev()
68d1f1d4af18 wwan: core: Fix missing RTM_NEWLINK event for default link
Quoted 4 lines

Patches currently in stable-queue which might be from [email protected] are

queue-5.14/wwan-core-fix-missing-rtm_newlink-event-for-default-link.patch queue-5.14/wcn36xx-ensure-finish-scan-is-not-requested-before-start-scan.patch

Signature · 1 line
Sergey
maintainer
#2 lore raw
Quoted 63 lines · Sergey Ryazanov

Hello Greg,

looks like the commit 8cc236db1a91 ("wwan: core: Fix missing RTM_NEWLINK event for default link") already included in v5.14, see details below the patch.

Quoted 46 lines · On Wed, Sep 15, 2021 at 3:54 PM <[email protected]> wrote:

This is a note to let you know that I've just added the patch titled

wwan: core: Fix missing RTM_NEWLINK event for default link

to the 5.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
wwan-core-fix-missing-rtm_newlink-event-for-default-link.patch
and it can be found in the queue-5.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

From 8cc236db1a91d0c91651595ba75942a583008455 Mon Sep 17 00:00:00 2001
From: Loic Poulain <[email protected]>
Date: Thu, 22 Jul 2021 20:21:05 +0200
Subject: wwan: core: Fix missing RTM_NEWLINK event for default link

From: Loic Poulain <[email protected]>

commit 8cc236db1a91d0c91651595ba75942a583008455 upstream.

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()).

Fixes ca374290aaad ("wwan: core: support default netdev creation")
---
 drivers/net/wwan/wwan_core.c |    2 ++
 1 file changed, 2 insertions(+)

drivers/net/wwan/wwan_core.c static void wwan_create_default_link(str · line 996

Quoted 7 lines
drivers/net/wwan/wwan_core.c +2 -0
@@ -990,6 +990,8 @@ static void wwan_create_default_link(str
 
        rtnl_configure_link(dev, NULL); /* Link initialized, notify new link */
 
+       rtnl_configure_link(dev, NULL); /* Link initialized, notify new link */
+
 unlock:
        rtnl_unlock();

This change will duplicate the notification call. Fix already in v5.14:

Quoted 3 lines
$ git log --oneline v5.14 -- drivers/net/wwan/wwan_core.c
d9d5b8961284 wwan: core: Avoid returning NULL from wwan_create_dev()
68d1f1d4af18 wwan: core: Fix missing RTM_NEWLINK event for default link

Ah, thanks for this. It ended up going into Linus's tree with two different commit ids.

I'll go drop it now.

greg k-h