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 fcd7c13e3f519e3effc607cab19cf65613c7f7bf 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: 8e15aee62161 ("net: move altnames together with the netdevice") Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/net/devlink/leftover.c b/net/devlink/leftover.c index 6fee4ce6724b7..53dde50c5d6e2 100644 --- a/net/devlink/leftover.c +++ b/net/devlink/leftover.c @@ -10009,7 +10009,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) { @@ -10104,7 +10108,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);