Patch "net: devlink: move port_type_warn_schedule() call to __devlink_port_type_set()" has been added to the 6.1-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

    net: devlink: move port_type_warn_schedule() call to __devlink_port_type_set()

to the 6.1-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:
     net-devlink-move-port_type_warn_schedule-call-to-__d.patch
and it can be found in the queue-6.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 30acfeed998f4bfd42d905c2d63c335a6c098697
Author: Jiri Pirko <jiri@xxxxxxxxxxx>
Date:   Wed Nov 2 17:02:00 2022 +0100

    net: devlink: move port_type_warn_schedule() call to __devlink_port_type_set()
    
    [ Upstream commit 8573a04404ddacb2d966eef09bf38b2ad6dbe86f ]
    
    As __devlink_port_type_set() is going to be called directly from netdevice
    notifier event handle in one of the follow-up patches, move the
    port_type_warn_schedule() call there.
    
    Signed-off-by: Jiri Pirko <jiri@xxxxxxxxxx>
    Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
    Stable-dep-of: fef5b228dd38 ("rtnetlink: move IFLA_GSO_ tb check to validate_linkmsg")
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/net/core/devlink.c b/net/core/devlink.c
index 4f95987e02234..8a8d838c53cfa 100644
--- a/net/core/devlink.c
+++ b/net/core/devlink.c
@@ -10003,7 +10003,11 @@ static void __devlink_port_type_set(struct devlink_port *devlink_port,
 {
 	ASSERT_DEVLINK_PORT_REGISTERED(devlink_port);
 
-	devlink_port_type_warn_cancel(devlink_port);
+	if (type == DEVLINK_PORT_TYPE_NOTSET)
+		devlink_port_type_warn_schedule(devlink_port);
+	else
+		devlink_port_type_warn_cancel(devlink_port);
+
 	spin_lock_bh(&devlink_port->type_lock);
 	devlink_port->type = type;
 	switch (type) {
@@ -10098,7 +10102,6 @@ EXPORT_SYMBOL_GPL(devlink_port_type_ib_set);
 void devlink_port_type_clear(struct devlink_port *devlink_port)
 {
 	__devlink_port_type_set(devlink_port, DEVLINK_PORT_TYPE_NOTSET, NULL);
-	devlink_port_type_warn_schedule(devlink_port);
 }
 EXPORT_SYMBOL_GPL(devlink_port_type_clear);
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux