From: Mark Brown <broonie@kernel.org>
To: David Miller <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Networking <netdev@vger.kernel.org>
Cc: David Yang <mmyangfl@gmail.com>, Kees Cook <kees@kernel.org>,
Kees Cook <kees+treewide@kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linux Next Mailing List <linux-next@vger.kernel.org>
Subject: linux-next: manual merge of the net-next tree with the origin tree
Date: Thu, 12 Nov 2026 13:58:27 +0000 [thread overview]
Message-ID: <avXGA_FRXwZM7ExI@sirena.org.uk> (raw)
[-- Attachment #1: Type: text/plain, Size: 4183 bytes --]
Hi all,
Today's linux-next merge of the net-next tree got a conflict in:
drivers/net/dsa/motorcomm/chip.c
between commit:
4dd10fbbeb9c3 ("treewide: Convert devm_kmalloc() family to the devm_kmalloc_obj() family")
from the origin tree and commit:
a9a173f81c83e ("net: dsa: motorcomm: Free the MIB block on port teardown")
from the net-next tree.
I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.
diff --combined drivers/net/dsa/motorcomm/chip.c
index c753c746490a1,a1d0ce35f4f3f..0000000000000
--- a/drivers/net/dsa/motorcomm/chip.c
+++ b/drivers/net/dsa/motorcomm/chip.c
@@@ -1405,9 -1405,6 +1405,9 @@@ yt921x_dsa_port_bridge_join(struct dsa_
struct netlink_ext_ack *extack)
{
struct yt921x_priv *priv = dsa_to_yt921x_priv(ds);
+ struct yt921x_port *pp = &priv->ports[port];
+ struct net_device *brport_dev;
+ struct dsa_port *dp;
u16 ports_mask;
int res;
@@@ -1417,12 -1414,7 +1417,12 @@@
ports_mask = dsa_bridge_ports(ds, bridge.dev);
ports_mask |= priv->cpu_ports_mask;
+ dp = dsa_to_port(ds, port);
+ brport_dev = dsa_port_to_bridge_port(dp);
+
mutex_lock(&priv->reg_lock);
+ pp->isolated = br_port_flag_is_set(brport_dev, BR_ISOLATED);
+ pp->hairpin = br_port_flag_is_set(brport_dev, BR_HAIRPIN_MODE);
res = yt921x_bridge_join(priv, port, ports_mask);
mutex_unlock(&priv->reg_lock);
@@@ -1845,10 -1837,9 +1845,9 @@@ yt921x_phylink_mac_link_down(struct phy
int port = dp->index;
int res;
- /* No need to sync; port control block is hold until device remove */
pm = priv->ports[port].mib;
if (pm)
- cancel_delayed_work(&pm->work);
+ cancel_delayed_work_sync(&pm->work);
mutex_lock(&priv->reg_lock);
res = yt921x_port_down(priv, port);
@@@ -2002,11 -1993,11 +2001,11 @@@ static void yt921x_dsa_port_teardown(st
struct yt921x_port *pp = &priv->ports[port];
struct yt921x_mib *pm = pp->mib;
- /* get_stats64() might not be synchronized with port_teardown(), hold
- * the MIB block till the device teardown
- */
- if (pm)
+ if (pm) {
disable_delayed_work_sync(&pm->work);
+ pp->mib = NULL;
+ kvfree(pm);
+ }
}
static int yt921x_dsa_port_setup(struct dsa_switch *ds, int port)
@@@ -2014,12 -2005,11 +2013,11 @@@
struct yt921x_priv *priv = dsa_to_yt921x_priv(ds);
struct yt921x_port *pp = &priv->ports[port];
const struct yt921x_info *info = priv->info;
- struct device *dev = yt921x_priv_to_device(priv);
- struct yt921x_mib *pm = pp->mib;
+ struct yt921x_mib *pm;
int res;
- if (!pm && (BIT(port) & yt921x_info_ports_mask(info))) {
- pm = devm_kzalloc_obj(dev, *pm);
+ if (BIT(port) & yt921x_info_ports_mask(info)) {
+ pm = kvzalloc_obj(*pm);
if (!pm)
return -ENOMEM;
pp->mib = pm;
@@@ -2027,20 -2017,15 +2025,15 @@@
pm->port = pp;
u64_stats_init(&pm->syncp);
INIT_DELAYED_WORK(&pm->work, yt921x_mib_poll);
- /* Start disabled, so that the enable below always pairs with
- * either this disable or the one from a previous teardown
- */
- disable_delayed_work_sync(&pm->work);
}
mutex_lock(&priv->reg_lock);
res = yt921x_port_setup(priv, port);
mutex_unlock(&priv->reg_lock);
- if (res)
+ if (res) {
+ yt921x_dsa_port_teardown(ds, port);
return res;
-
- if (pm)
- enable_delayed_work(&pm->work);
+ }
return 0;
}
@@@ -2625,11 -2610,11 +2618,11 @@@ static int yt921x_mdio_probe(struct mdi
struct yt921x_priv *priv;
struct dsa_switch *ds;
- priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
+ priv = devm_kzalloc_obj(dev, *priv);
if (!priv)
return -ENOMEM;
- mdio = devm_kzalloc(dev, sizeof(*mdio), GFP_KERNEL);
+ mdio = devm_kzalloc_obj(dev, *mdio);
if (!mdio)
return -ENOMEM;
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next reply other threads:[~2026-11-12 13:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-12 13:58 Mark Brown [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-11-10 17:03 Mark Brown
2026-08-17 14:26 Mark Brown
2026-02-26 13:10 Mark Brown
2024-12-03 19:57 Mark Brown
2023-04-13 16:06 broonie
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=avXGA_FRXwZM7ExI@sirena.org.uk \
--to=broonie@kernel.org \
--cc=davem@davemloft.net \
--cc=kees+treewide@kernel.org \
--cc=kees@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=mmyangfl@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®