* Re: [PATCH net v4 2/2] tipc: fix NULL deref in tipc_named_node_up() on empty publication list
From: Weiming Shi @ 2026-07-18 9:28 UTC (permalink / raw)
To: Tung Quang Nguyen
Cc: netdev@vger.kernel.org, tipc-discussion@lists.sourceforge.net,
linux-kernel@vger.kernel.org, xmei5@asu.edu, Jon Maloy,
David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Simon Horman
In-Reply-To: <CANgPUi31G4DvrBPDRGniPDzWTUKo_3HQL8W1nq8BMmtnp8Fa+g@mail.gmail.com>
Weiming Shi <bestswngs@gmail.com> 于2026年7月18日周六 03:00写道:
>
> Weiming Shi <bestswngs@gmail.com> 于2026年7月18日周六 02:34写道:
> >
> > Tung Quang Nguyen <tung.quang.nguyen@est.tech> 于2026年7月17日周五 17:48写道:
> > >
> > > >Subject: [PATCH net v4 2/2] tipc: fix NULL deref in tipc_named_node_up() on
> > > >empty publication list
> > > >
> > > >named_distribute() ends by stamping the last_bulk flag on the tail skb via
> > > >buf_msg(skb_peek_tail(list)). When the publication list is empty no skb is
> > > >enqueued, skb_peek_tail() returns NULL, and buf_msg(NULL) is dereferenced.
> > > >
> > > >tipc_named_node_up() runs this on &nt->cluster_scope. With a node-id
> > > >configuration cluster_scope is populated only later by tipc_net_finalize(), so a
> > > >peer link that comes up first reaches named_distribute() with an empty list. It
> > > >is reachable by an unprivileged user (TIPC genl ops use
> > > >GENL_UNS_ADMIN_PERM) over a UDP bearer in a user+net namespace:
> > > >
> > > > KASAN: null-ptr-deref in range [0x00000000000000d8-0x00000000000000df]
> > > > RIP: 0010:tipc_named_node_up (net/tipc/name_distr.c:196)
> > > > tipc_named_node_up (net/tipc/name_distr.c:196 net/tipc/name_distr.c:221)
> > > > tipc_node_write_unlock (net/tipc/node.c:428)
> > > > tipc_rcv (net/tipc/node.c:2185)
> > > > tipc_udp_recv (net/tipc/udp_media.c:392) Kernel panic - not syncing: Fatal
> > > >exception in interrupt
> > > >
> > > >The peer holds back this node's later name updates until it sees a bulk with the
> > > >last_bulk flag, so simply skipping the send would stall it. Emit an item-less bulk
> > > >when the publication list is empty, so the peer still receives the last_bulk flag
> > > >and opens.
> > > >
> > > >Fixes: cad2929dc432 ("tipc: update a binding service via broadcast")
> > > >Reported-by: Xiang Mei <xmei5@asu.edu>
> > > >Assisted-by: Claude:claude-opus-4-8
> > > >Signed-off-by: Weiming Shi <bestswngs@gmail.com>
> > > >---
> > > > net/tipc/name_distr.c | 14 ++++++++++++++
> > > > 1 file changed, 14 insertions(+)
> > > >
> > > >diff --git a/net/tipc/name_distr.c b/net/tipc/name_distr.c index
> > > >ba4f4906e13b..a8bb7bd101ea 100644
> > > >--- a/net/tipc/name_distr.c
> > > >+++ b/net/tipc/name_distr.c
> > > >@@ -192,6 +192,20 @@ static void named_distribute(struct net *net, struct
> > > >sk_buff_head *list,
> > > > skb_trim(skb, INT_H_SIZE + (msg_dsz - msg_rem));
> > > > __skb_queue_tail(list, skb);
> > > > }
> > > >+
> > > >+ if (skb_queue_empty(list)) {
> > > >+ skb = named_prepare_buf(net, PUBLICATION, 0, dnode);
> > > >+ if (!skb) {
> > > >+ pr_warn("Bulk publication failure\n");
> > > >+ return;
> > > >+ }
> > > >+ hdr = buf_msg(skb);
> > > >+ msg_set_bc_ack_invalid(hdr, true);
> > > >+ msg_set_bulk(hdr);
> > > >+ msg_set_non_legacy(hdr);
> > > >+ __skb_queue_tail(list, skb);
> > > >+ }
> > > As I explained before, this approach is wrong because
> > > 1. It does not handle memory allocation failure.
> > > 2. It breaks receiving peer by sending non-data message to that peer in case skb is not NULL.
> > >
> > > Could you please test below patch to see if it fixes the NULL dereference issue you reported ?
> >
> > Hi ,
> > Tested your patch, it fixes the NULL dereference I reported. No more
> > panic with an empty cluster_scope .
> >
> > One new bug found during testing: if tipc_nametbl_publish() fails in
> > tipc_net_finalize(), the node is
> > still marked finalized, so the deferred worker wakes up and calls
> > named_distribute() with an empty list,
> > hitting the same NULL dereference.
> >
> > I have the fix ready and sent it out:
> >
> > https://lore.kernel.org/all/20260717183047.2725959-1-bestswngs@gmail.com/
> > https://lore.kernel.org/all/20260717183047.2725959-2-bestswngs@gmail.com/
> > https://lore.kernel.org/all/20260717183047.2725959-3-bestswngs@gmail.com/
> >
> > Thanks,
> > Weiming Shi
> >
>
> Hi,
> The v5 I sent earlier was incomplete. It only carried the two
> follow-up patches and depended on Tung's
> patch from this thread as its base, which made the series hard to
> apply on its own.
>
> I have resent the series as v6:
> https://lore.kernel.org/all/20260717185701.2828080-1-bestswngs@gmail.com/
>
> Sorry for the noise.
Sorry for the noise. This is the latest version, with some modifications made.
https://lore.kernel.org/all/20260718092544.785289-1-bestswngs@gmail.com/
> > >
> > > ---
> > > net/tipc/core.c | 1 +
> > > net/tipc/core.h | 2 ++
> > > net/tipc/name_distr.c | 48 +++++++++++++++++++++++++++++++++++++++----
> > > net/tipc/name_distr.h | 3 ++-
> > > net/tipc/net.c | 2 ++
> > > net/tipc/node.c | 34 ++++++++++++++++++++++++++++--
> > > 6 files changed, 83 insertions(+), 7 deletions(-)
> > >
> > > diff --git a/net/tipc/core.c b/net/tipc/core.c
> > > index 315975c3be81..9e81be4f01cf 100644
> > > --- a/net/tipc/core.c
> > > +++ b/net/tipc/core.c
> > > @@ -61,6 +61,7 @@ static int __net_init tipc_init_net(struct net *net)
> > > tn->trial_addr = 0;
> > > tn->addr_trial_end = 0;
> > > tn->capabilities = TIPC_NODE_CAPABILITIES;
> > > + atomic_set(&tn->finalized, 0);
> > > INIT_WORK(&tn->work, tipc_net_finalize_work);
> > > memset(tn->node_id, 0, sizeof(tn->node_id));
> > > memset(tn->node_id_string, 0, sizeof(tn->node_id_string));
> > > diff --git a/net/tipc/core.h b/net/tipc/core.h
> > > index 9ce5f9ff6cc0..76768844c808 100644
> > > --- a/net/tipc/core.h
> > > +++ b/net/tipc/core.h
> > > @@ -145,6 +145,8 @@ struct tipc_net {
> > > struct work_struct work;
> > > /* The numbers of work queues in schedule */
> > > atomic_t wq_count;
> > > + /* flag to indicate work has finished */
> > > + atomic_t finalized;
> > > };
> > >
> > > static inline struct tipc_net *tipc_net(struct net *net)
> > > diff --git a/net/tipc/name_distr.c b/net/tipc/name_distr.c
> > > index ba5f4906e13b..8a1692dbd243 100644
> > > --- a/net/tipc/name_distr.c
> > > +++ b/net/tipc/name_distr.c
> > > @@ -147,7 +147,7 @@ struct sk_buff *tipc_named_withdraw(struct net *net, struct publication *p)
> > > * @pls: linked list of publication items to be packed into buffer chain
> > > * @seqno: sequence number for this message
> > > */
> > > -static void named_distribute(struct net *net, struct sk_buff_head *list,
> > > +static int named_distribute(struct net *net, struct sk_buff_head *list,
> > > u32 dnode, struct list_head *pls, u16 seqno)
> > > {
> > > struct publication *publ;
> > > @@ -164,8 +164,9 @@ static void named_distribute(struct net *net, struct sk_buff_head *list,
> > > skb = named_prepare_buf(net, PUBLICATION, msg_rem,
> > > dnode);
> > > if (!skb) {
> > > + __skb_queue_purge(list);
> > > pr_warn("Bulk publication failure\n");
> > > - return;
> > > + return 1;
> > > }
> > > hdr = buf_msg(skb);
> > > msg_set_bc_ack_invalid(hdr, true);
> > > @@ -195,6 +196,8 @@ static void named_distribute(struct net *net, struct sk_buff_head *list,
> > > hdr = buf_msg(skb_peek_tail(list));
> > > msg_set_last_bulk(hdr);
> > > msg_set_named_seqno(hdr, seqno);
> > > +
> > > + return 0;
> > > }
> > >
> > > /**
> > > @@ -203,7 +206,7 @@ static void named_distribute(struct net *net, struct sk_buff_head *list,
> > > * @dnode: destination node
> > > * @capabilities: peer node's capabilities
> > > */
> > > -void tipc_named_node_up(struct net *net, u32 dnode, u16 capabilities)
> > > +int tipc_named_node_up(struct net *net, u32 dnode, u16 capabilities)
> > > {
> > > struct name_table *nt = tipc_name_table(net);
> > > struct tipc_net *tn = tipc_net(net);
> > > @@ -218,9 +221,46 @@ void tipc_named_node_up(struct net *net, u32 dnode, u16 capabilities)
> > > spin_unlock_bh(&tn->nametbl_lock);
> > >
> > > read_lock_bh(&nt->cluster_scope_lock);
> > > - named_distribute(net, &head, dnode, &nt->cluster_scope, seqno);
> > > + /* tipc_net_finalize_work() has not finished inserting self address to
> > > + * name table yet.
> > > + */
> > > + if (unlikely(list_empty(&nt->cluster_scope))) {
> > > + read_unlock_bh(&nt->cluster_scope_lock);
> > > + return 1;
> > > + }
> > > +
> > > + if (named_distribute(net, &head, dnode, &nt->cluster_scope, seqno)) {
> > > + read_unlock_bh(&nt->cluster_scope_lock);
> > > + return -ENOBUFS;
> > > + }
> > > +
> > > tipc_node_xmit(net, &head, dnode, 0);
> > > read_unlock_bh(&nt->cluster_scope_lock);
> > > + return 0;
> > > +}
> > > +
> > > +int tipc_named_dist_cluster_scope(struct net *net, u32 dnode)
> > > +{
> > > + struct name_table *nt = tipc_name_table(net);
> > > + struct tipc_net *tn = tipc_net(net);
> > > + struct sk_buff_head head;
> > > + u16 seqno;
> > > +
> > > + __skb_queue_head_init(&head);
> > > + wait_var_event(&tn->finalized, atomic_read(&tn->finalized));
> > > + spin_lock_bh(&tn->nametbl_lock);
> > > + seqno = nt->snd_nxt;
> > > + spin_unlock_bh(&tn->nametbl_lock);
> > > +
> > > + read_lock_bh(&nt->cluster_scope_lock);
> > > + if (named_distribute(net, &head, dnode, &nt->cluster_scope, seqno)) {
> > > + read_unlock_bh(&nt->cluster_scope_lock);
> > > + return -ENOBUFS;
> > > + }
> > > + tipc_node_xmit(net, &head, dnode, 0);
> > > + read_unlock_bh(&nt->cluster_scope_lock);
> > > +
> > > + return 0;
> > > }
> > >
> > > /**
> > > diff --git a/net/tipc/name_distr.h b/net/tipc/name_distr.h
> > > index c677f6f082df..cadf4e8c3e66 100644
> > > --- a/net/tipc/name_distr.h
> > > +++ b/net/tipc/name_distr.h
> > > @@ -69,7 +69,8 @@ struct distr_item {
> > >
> > > struct sk_buff *tipc_named_publish(struct net *net, struct publication *publ);
> > > struct sk_buff *tipc_named_withdraw(struct net *net, struct publication *publ);
> > > -void tipc_named_node_up(struct net *net, u32 dnode, u16 capabilities);
> > > +int tipc_named_node_up(struct net *net, u32 dnode, u16 capabilities);
> > > +int tipc_named_dist_cluster_scope(struct net *net, u32 dnode);
> > > void tipc_named_rcv(struct net *net, struct sk_buff_head *namedq,
> > > u16 *rcv_nxt, bool *open);
> > > void tipc_named_reinit(struct net *net);
> > > diff --git a/net/tipc/net.c b/net/tipc/net.c
> > > index 7e65d0b0c4a8..4c144e720ac1 100644
> > > --- a/net/tipc/net.c
> > > +++ b/net/tipc/net.c
> > > @@ -139,6 +139,8 @@ static void tipc_net_finalize(struct net *net, u32 addr)
> > > tipc_sk_reinit(net);
> > > tipc_mon_reinit_self(net);
> > > tipc_nametbl_publish(net, &ua, &sk, addr);
> > > + atomic_inc(&tn->finalized);
> > > + wake_up_var(&tn->finalized);
> > > }
> > >
> > > void tipc_net_finalize_work(struct work_struct *work)
> > > diff --git a/net/tipc/node.c b/net/tipc/node.c
> > > index 8e4ef2630ae4..c5b0a98324c3 100644
> > > --- a/net/tipc/node.c
> > > +++ b/net/tipc/node.c
> > > @@ -145,6 +145,8 @@ struct tipc_node {
> > > #ifdef CONFIG_TIPC_CRYPTO
> > > struct tipc_crypto *crypto_rx;
> > > #endif
> > > + /* Work item for bulk distribution of cluster scope publications */
> > > + struct work_struct work;
> > > };
> > >
> > > /* Node FSM states and events:
> > > @@ -303,6 +305,7 @@ static void tipc_node_free(struct rcu_head *rp)
> > > #ifdef CONFIG_TIPC_CRYPTO
> > > tipc_crypto_stop(&n->crypto_rx);
> > > #endif
> > > + cancel_work_sync(&n->work);
> > > kfree(n);
> > > }
> > >
> > > @@ -393,6 +396,19 @@ static void tipc_node_write_unlock_fast(struct tipc_node *n)
> > > write_unlock_bh(&n->lock);
> > > }
> > >
> > > +static void tipc_node_dist_bulk(struct work_struct *work)
> > > +{
> > > + struct tipc_node *node = container_of(work, struct tipc_node, work);
> > > +
> > > + if (tipc_named_dist_cluster_scope(node->net, node->addr) < 0) {
> > > + u32 bearer_id = node->link_id & 0xffff;
> > > +
> > > + tipc_node_link_down(node, bearer_id, false);
> > > + }
> > > +
> > > + tipc_node_put(node);
> > > +}
> > > +
> > > static void tipc_node_write_unlock(struct tipc_node *n)
> > > __releases(n->lock)
> > > {
> > > @@ -424,8 +440,21 @@ static void tipc_node_write_unlock(struct tipc_node *n)
> > > if (flags & TIPC_NOTIFY_NODE_DOWN)
> > > tipc_publ_notify(net, publ_list, node, n->capabilities);
> > >
> > > - if (flags & TIPC_NOTIFY_NODE_UP)
> > > - tipc_named_node_up(net, node, n->capabilities);
> > > + if (flags & TIPC_NOTIFY_NODE_UP) {
> > > + int rc = 0;
> > > +
> > > + rc = tipc_named_node_up(net, node, n->capabilities);
> > > + /* Defer bulk distribution to work queue */
> > > + if (rc > 0) {
> > > + tipc_node_get(n);
> > > + schedule_work(&n->work);
> > > + } else if (rc < 0) {
> > > + /* Bring the link down to start over bulk distribution
> > > + * when the link is up again.
> > > + */
> > > + tipc_node_link_down(n, bearer_id, false);
> > > + }
> > > + }
> > >
> > > if (flags & TIPC_NOTIFY_LINK_UP) {
> > > tipc_mon_peer_up(net, node, bearer_id);
> > > @@ -564,6 +593,7 @@ struct tipc_node *tipc_node_create(struct net *net, u32 addr, u8 *peer_id,
> > > INIT_LIST_HEAD(&n->list);
> > > INIT_LIST_HEAD(&n->publ_list);
> > > INIT_LIST_HEAD(&n->conn_sks);
> > > + INIT_WORK(&n->work, tipc_node_dist_bulk);
> > > skb_queue_head_init(&n->bc_entry.namedq);
> > > skb_queue_head_init(&n->bc_entry.inputq1);
> > > __skb_queue_head_init(&n->bc_entry.arrvq);
^ permalink raw reply
* [bug report] net: udp_tunnel_nic: reference count leak during network namespace migration
From: Tetsuo Handa @ 2026-07-18 12:03 UTC (permalink / raw)
To: Network Development, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Simon Horman
[-- Attachment #1: Type: text/plain, Size: 3565 bytes --]
Description:
syzbot is reporting a reference count leak when a netdevsim device configured with
UDP tunnel offloads is moved to another network namespace, and then the target
namespace is destroyed.
Cause of the Leak:
The root cause is a structural mismatch between the namespace migration logic in
__dev_change_net_namespace() and the unregistration path in udp_tunnel_nic_unregister().
1. During __dev_change_net_namespace(), it triggers a temporary NETDEV_UNREGISTER event
to flush old configurations:
/* net/core/dev.c: __dev_change_net_namespace() */
----------
/* Notify protocols, that we are about to destroy
* this device. They should clean all the things.
*
* Note that dev->reg_state stays at NETREG_REGISTERED.
* This is wanted because this way 8021q and macvlan know
* the device is just moving and can keep their slaves up.
*/
call_netdevice_notifiers(NETDEV_UNREGISTER, dev);
rcu_barrier(); // <== Proceeds immediately to the new namespace setup without any retries or loops.
----------
2. This event is handled by udp_tunnel_nic_netdevice_event(), which correctly
invokes udp_tunnel_nic_unregister().
3. Inside udp_tunnel_nic_unregister(), there is an asynchronous work-pending check
designed for normal device destruction paths:
/* net/ipv4/udp_tunnel_nic.c: udp_tunnel_nic_unregister() */
----------
/* Wait for the work to be done using the state, netdev core will
* retry unregister until we give up our reference on this device.
*/
if (utn->work_pending)
return;
udp_tunnel_nic_free(utn);
release_dev:
dev->udp_tunnel_nic = NULL;
dev_put(dev); // <== Will not be called if we returned early, for NETDEV_UNREGISTER is fired only once.
----------
For a standard unregister_netdevice() flow, this early return is perfectly fine
because the netdev core loop (netdev_wait_allrefs()) will continually retry
unregistration until all references are dropped.
4. However, __dev_change_net_namespace() does not have a retry loop for NETDEV_UNREGISTER.
It fires the notification exactly once. If utn->work_pending happens to be true at that
precise moment, udp_tunnel_nic_unregister() returns early and silently skips the mandatory
dev_put(dev).
5. Consequently, the old instance's refcount is never decremented, while the device
completes its move and calls NETDEV_REGISTER in the new namespace-eventually leading to
an unfreeable netdev balance when the interface is finally dismantled.
Custom refcount tracker Analysis Summary:
Attached log (obtained using next-20260714 which carries linux-next only patch) shows
an unbalanced +1 from the UDP tunnel subsystem across the namespace migration lifecycle:
* netdevsim3[12]: +1 at udp_tunnel_nic_register (Initial registration)
* netdevsim3[59]: +1 at udp_tunnel_nic_register (Post-migration re-registration)
* netdevsim3[69]: -1 at udp_tunnel_nic_unregister (Final destruction)
* Result: Total sum for udp_tunnel_nic is +1, leaving balance is 1 for the device
registration tracker. The NETDEV_UNREGISTER notice fired inside
__dev_change_net_namespace() was completely skipped due to the early return path.
Reported-by: syzbot+e2af46126e0644cbebdd@syzkaller.appspotmail.com
Analyzed-by: AI mode in Google search (no mail address)
[-- Attachment #2: 15f44cb9580000.txt --]
[-- Type: text/plain, Size: 83210 bytes --]
unregister_netdevice: waiting for netdevsim3 to become free. Usage count = 2
balance for netdevsim3@dst_entry is unknown
Call trace for netdevsim3[1] +1 at
__dev_hold include/linux/netdevice.h:4523 [inline]
netdev_hold include/linux/netdevice.h:4566 [inline]
rx_queue_add_kobject net/core/net-sysfs.c:1236 [inline]
net_rx_queue_update_kobjects+0x166/0x790 net/core/net-sysfs.c:1301
register_queue_kobjects net/core/net-sysfs.c:2093 [inline]
netdev_register_kobject+0x21f/0x310 net/core/net-sysfs.c:2341
register_netdevice+0x1455/0x1ed0 net/core/dev.c:11452
nsim_init_netdevsim drivers/net/netdevsim/netdev.c:1070 [inline]
nsim_create+0xbe9/0x1160 drivers/net/netdevsim/netdev.c:1152
__nsim_dev_port_add+0x7f8/0xcd0 drivers/net/netdevsim/dev.c:1509
nsim_dev_port_add_all+0x37/0xf0 drivers/net/netdevsim/dev.c:1570
nsim_drv_probe+0x8d6/0xc00 drivers/net/netdevsim/dev.c:1731
call_driver_probe drivers/base/dd.c:-1 [inline]
really_probe+0x254/0xae0 drivers/base/dd.c:706
__driver_probe_device+0x1e8/0x360 drivers/base/dd.c:868
driver_probe_device+0x4f/0x240 drivers/base/dd.c:898
__device_attach_driver+0x270/0x410 drivers/base/dd.c:1026
bus_for_each_drv+0x25b/0x2f0 drivers/base/bus.c:500
__device_attach+0x2c7/0x450 drivers/base/dd.c:1098
device_initial_probe+0xa1/0xd0 drivers/base/dd.c:1153
bus_probe_device+0x12d/0x220 drivers/base/bus.c:620
device_add+0x7d7/0xb80 drivers/base/core.c:3772
nsim_bus_dev_new drivers/net/netdevsim/bus.c:471 [inline]
new_device_store+0x37b/0x710 drivers/net/netdevsim/bus.c:191
kernfs_fop_write_iter+0x3a5/0x540 fs/kernfs/file.c:345
new_sync_write fs/read_write.c:595 [inline]
vfs_write+0x61e/0xbb0 fs/read_write.c:687
ksys_write+0x156/0x270 fs/read_write.c:739
Call trace for netdevsim3[2] +1 at
__dev_hold include/linux/netdevice.h:4523 [inline]
netdev_hold include/linux/netdevice.h:4566 [inline]
netdev_queue_add_kobject net/core/net-sysfs.c:1973 [inline]
netdev_queue_update_kobjects+0x16d/0x6b0 net/core/net-sysfs.c:2035
register_queue_kobjects net/core/net-sysfs.c:2098 [inline]
netdev_register_kobject+0x258/0x310 net/core/net-sysfs.c:2341
register_netdevice+0x1455/0x1ed0 net/core/dev.c:11452
nsim_init_netdevsim drivers/net/netdevsim/netdev.c:1070 [inline]
nsim_create+0xbe9/0x1160 drivers/net/netdevsim/netdev.c:1152
__nsim_dev_port_add+0x7f8/0xcd0 drivers/net/netdevsim/dev.c:1509
nsim_dev_port_add_all+0x37/0xf0 drivers/net/netdevsim/dev.c:1570
nsim_drv_probe+0x8d6/0xc00 drivers/net/netdevsim/dev.c:1731
call_driver_probe drivers/base/dd.c:-1 [inline]
really_probe+0x254/0xae0 drivers/base/dd.c:706
__driver_probe_device+0x1e8/0x360 drivers/base/dd.c:868
driver_probe_device+0x4f/0x240 drivers/base/dd.c:898
__device_attach_driver+0x270/0x410 drivers/base/dd.c:1026
bus_for_each_drv+0x25b/0x2f0 drivers/base/bus.c:500
__device_attach+0x2c7/0x450 drivers/base/dd.c:1098
device_initial_probe+0xa1/0xd0 drivers/base/dd.c:1153
bus_probe_device+0x12d/0x220 drivers/base/bus.c:620
device_add+0x7d7/0xb80 drivers/base/core.c:3772
nsim_bus_dev_new drivers/net/netdevsim/bus.c:471 [inline]
new_device_store+0x37b/0x710 drivers/net/netdevsim/bus.c:191
kernfs_fop_write_iter+0x3a5/0x540 fs/kernfs/file.c:345
new_sync_write fs/read_write.c:595 [inline]
vfs_write+0x61e/0xbb0 fs/read_write.c:687
ksys_write+0x156/0x270 fs/read_write.c:739
Call trace for netdevsim3[3] +1 at
__dev_hold include/linux/netdevice.h:4523 [inline]
netdev_hold+0x27/0xc0 include/linux/netdevice.h:4566
register_netdevice+0x176b/0x1ed0 net/core/dev.c:11476
nsim_init_netdevsim drivers/net/netdevsim/netdev.c:1070 [inline]
nsim_create+0xbe9/0x1160 drivers/net/netdevsim/netdev.c:1152
__nsim_dev_port_add+0x7f8/0xcd0 drivers/net/netdevsim/dev.c:1509
nsim_dev_port_add_all+0x37/0xf0 drivers/net/netdevsim/dev.c:1570
nsim_drv_probe+0x8d6/0xc00 drivers/net/netdevsim/dev.c:1731
call_driver_probe drivers/base/dd.c:-1 [inline]
really_probe+0x254/0xae0 drivers/base/dd.c:706
__driver_probe_device+0x1e8/0x360 drivers/base/dd.c:868
driver_probe_device+0x4f/0x240 drivers/base/dd.c:898
__device_attach_driver+0x270/0x410 drivers/base/dd.c:1026
bus_for_each_drv+0x25b/0x2f0 drivers/base/bus.c:500
__device_attach+0x2c7/0x450 drivers/base/dd.c:1098
device_initial_probe+0xa1/0xd0 drivers/base/dd.c:1153
bus_probe_device+0x12d/0x220 drivers/base/bus.c:620
device_add+0x7d7/0xb80 drivers/base/core.c:3772
nsim_bus_dev_new drivers/net/netdevsim/bus.c:471 [inline]
new_device_store+0x37b/0x710 drivers/net/netdevsim/bus.c:191
kernfs_fop_write_iter+0x3a5/0x540 fs/kernfs/file.c:345
new_sync_write fs/read_write.c:595 [inline]
vfs_write+0x61e/0xbb0 fs/read_write.c:687
ksys_write+0x156/0x270 fs/read_write.c:739
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x17b/0x530 arch/x86/entry/syscall_64.c:85
Call trace for netdevsim3[4] +3 at
__dev_hold include/linux/netdevice.h:4523 [inline]
netdev_hold include/linux/netdevice.h:4566 [inline]
dev_hold include/linux/netdevice.h:4589 [inline]
netdevice_queue_work drivers/infiniband/core/roce_gid_mgmt.c:674 [inline]
netdevice_event+0x4e1/0x8c0 drivers/infiniband/core/roce_gid_mgmt.c:822
notifier_call_chain+0x1a5/0x3d0 kernel/notifier.c:85
call_netdevice_notifiers_extack net/core/dev.c:2292 [inline]
call_netdevice_notifiers net/core/dev.c:2306 [inline]
register_netdevice+0x18c0/0x1ed0 net/core/dev.c:11490
nsim_init_netdevsim drivers/net/netdevsim/netdev.c:1070 [inline]
nsim_create+0xbe9/0x1160 drivers/net/netdevsim/netdev.c:1152
__nsim_dev_port_add+0x7f8/0xcd0 drivers/net/netdevsim/dev.c:1509
nsim_dev_port_add_all+0x37/0xf0 drivers/net/netdevsim/dev.c:1570
nsim_drv_probe+0x8d6/0xc00 drivers/net/netdevsim/dev.c:1731
call_driver_probe drivers/base/dd.c:-1 [inline]
really_probe+0x254/0xae0 drivers/base/dd.c:706
__driver_probe_device+0x1e8/0x360 drivers/base/dd.c:868
driver_probe_device+0x4f/0x240 drivers/base/dd.c:898
__device_attach_driver+0x270/0x410 drivers/base/dd.c:1026
bus_for_each_drv+0x25b/0x2f0 drivers/base/bus.c:500
__device_attach+0x2c7/0x450 drivers/base/dd.c:1098
device_initial_probe+0xa1/0xd0 drivers/base/dd.c:1153
bus_probe_device+0x12d/0x220 drivers/base/bus.c:620
device_add+0x7d7/0xb80 drivers/base/core.c:3772
nsim_bus_dev_new drivers/net/netdevsim/bus.c:471 [inline]
new_device_store+0x37b/0x710 drivers/net/netdevsim/bus.c:191
kernfs_fop_write_iter+0x3a5/0x540 fs/kernfs/file.c:345
new_sync_write fs/read_write.c:595 [inline]
vfs_write+0x61e/0xbb0 fs/read_write.c:687
ksys_write+0x156/0x270 fs/read_write.c:739
Call trace for netdevsim3[5] +3 at
__dev_hold include/linux/netdevice.h:4523 [inline]
netdev_hold include/linux/netdevice.h:4566 [inline]
dev_hold include/linux/netdevice.h:4589 [inline]
netdevice_queue_work drivers/infiniband/core/roce_gid_mgmt.c:675 [inline]
netdevice_event+0x592/0x8c0 drivers/infiniband/core/roce_gid_mgmt.c:822
notifier_call_chain+0x1a5/0x3d0 kernel/notifier.c:85
call_netdevice_notifiers_extack net/core/dev.c:2292 [inline]
call_netdevice_notifiers net/core/dev.c:2306 [inline]
register_netdevice+0x18c0/0x1ed0 net/core/dev.c:11490
nsim_init_netdevsim drivers/net/netdevsim/netdev.c:1070 [inline]
nsim_create+0xbe9/0x1160 drivers/net/netdevsim/netdev.c:1152
__nsim_dev_port_add+0x7f8/0xcd0 drivers/net/netdevsim/dev.c:1509
nsim_dev_port_add_all+0x37/0xf0 drivers/net/netdevsim/dev.c:1570
nsim_drv_probe+0x8d6/0xc00 drivers/net/netdevsim/dev.c:1731
call_driver_probe drivers/base/dd.c:-1 [inline]
really_probe+0x254/0xae0 drivers/base/dd.c:706
__driver_probe_device+0x1e8/0x360 drivers/base/dd.c:868
driver_probe_device+0x4f/0x240 drivers/base/dd.c:898
__device_attach_driver+0x270/0x410 drivers/base/dd.c:1026
bus_for_each_drv+0x25b/0x2f0 drivers/base/bus.c:500
__device_attach+0x2c7/0x450 drivers/base/dd.c:1098
device_initial_probe+0xa1/0xd0 drivers/base/dd.c:1153
bus_probe_device+0x12d/0x220 drivers/base/bus.c:620
device_add+0x7d7/0xb80 drivers/base/core.c:3772
nsim_bus_dev_new drivers/net/netdevsim/bus.c:471 [inline]
new_device_store+0x37b/0x710 drivers/net/netdevsim/bus.c:191
kernfs_fop_write_iter+0x3a5/0x540 fs/kernfs/file.c:345
new_sync_write fs/read_write.c:595 [inline]
vfs_write+0x61e/0xbb0 fs/read_write.c:687
ksys_write+0x156/0x270 fs/read_write.c:739
Call trace for netdevsim3[6] -11 at
__dev_put include/linux/netdevice.h:4509 [inline]
netdev_put include/linux/netdevice.h:4576 [inline]
dev_put include/linux/netdevice.h:4601 [inline]
netdevice_event_work_handler+0x136/0x270 drivers/infiniband/core/roce_gid_mgmt.c:652
process_one_work+0xaaf/0x1480 kernel/workqueue.c:3379
Call trace for netdevsim3[7] -11 at
__dev_put include/linux/netdevice.h:4509 [inline]
netdev_put include/linux/netdevice.h:4576 [inline]
dev_put include/linux/netdevice.h:4601 [inline]
netdevice_event_work_handler+0x1c1/0x270 drivers/infiniband/core/roce_gid_mgmt.c:653
process_one_work+0xaaf/0x1480 kernel/workqueue.c:3379
Call trace for netdevsim3[8] +1 at
__dev_hold include/linux/netdevice.h:4523 [inline]
netdev_hold include/linux/netdevice.h:4566 [inline]
neigh_parms_alloc+0x192/0x540 net/core/neighbour.c:1773
inetdev_init+0x117/0x4e0 net/ipv4/devinet.c:280
inetdev_event+0x307/0x15e0 net/ipv4/devinet.c:1590
notifier_call_chain+0x1a5/0x3d0 kernel/notifier.c:85
call_netdevice_notifiers_extack net/core/dev.c:2292 [inline]
call_netdevice_notifiers net/core/dev.c:2306 [inline]
register_netdevice+0x18c0/0x1ed0 net/core/dev.c:11490
nsim_init_netdevsim drivers/net/netdevsim/netdev.c:1070 [inline]
nsim_create+0xbe9/0x1160 drivers/net/netdevsim/netdev.c:1152
__nsim_dev_port_add+0x7f8/0xcd0 drivers/net/netdevsim/dev.c:1509
nsim_dev_port_add_all+0x37/0xf0 drivers/net/netdevsim/dev.c:1570
nsim_drv_probe+0x8d6/0xc00 drivers/net/netdevsim/dev.c:1731
call_driver_probe drivers/base/dd.c:-1 [inline]
really_probe+0x254/0xae0 drivers/base/dd.c:706
__driver_probe_device+0x1e8/0x360 drivers/base/dd.c:868
driver_probe_device+0x4f/0x240 drivers/base/dd.c:898
__device_attach_driver+0x270/0x410 drivers/base/dd.c:1026
bus_for_each_drv+0x25b/0x2f0 drivers/base/bus.c:500
__device_attach+0x2c7/0x450 drivers/base/dd.c:1098
device_initial_probe+0xa1/0xd0 drivers/base/dd.c:1153
bus_probe_device+0x12d/0x220 drivers/base/bus.c:620
device_add+0x7d7/0xb80 drivers/base/core.c:3772
nsim_bus_dev_new drivers/net/netdevsim/bus.c:471 [inline]
new_device_store+0x37b/0x710 drivers/net/netdevsim/bus.c:191
kernfs_fop_write_iter+0x3a5/0x540 fs/kernfs/file.c:345
Call trace for netdevsim3[9] +1 at
__dev_hold include/linux/netdevice.h:4523 [inline]
netdev_hold include/linux/netdevice.h:4566 [inline]
inetdev_init+0x19a/0x4e0 net/ipv4/devinet.c:286
inetdev_event+0x307/0x15e0 net/ipv4/devinet.c:1590
notifier_call_chain+0x1a5/0x3d0 kernel/notifier.c:85
call_netdevice_notifiers_extack net/core/dev.c:2292 [inline]
call_netdevice_notifiers net/core/dev.c:2306 [inline]
register_netdevice+0x18c0/0x1ed0 net/core/dev.c:11490
nsim_init_netdevsim drivers/net/netdevsim/netdev.c:1070 [inline]
nsim_create+0xbe9/0x1160 drivers/net/netdevsim/netdev.c:1152
__nsim_dev_port_add+0x7f8/0xcd0 drivers/net/netdevsim/dev.c:1509
nsim_dev_port_add_all+0x37/0xf0 drivers/net/netdevsim/dev.c:1570
nsim_drv_probe+0x8d6/0xc00 drivers/net/netdevsim/dev.c:1731
call_driver_probe drivers/base/dd.c:-1 [inline]
really_probe+0x254/0xae0 drivers/base/dd.c:706
__driver_probe_device+0x1e8/0x360 drivers/base/dd.c:868
driver_probe_device+0x4f/0x240 drivers/base/dd.c:898
__device_attach_driver+0x270/0x410 drivers/base/dd.c:1026
bus_for_each_drv+0x25b/0x2f0 drivers/base/bus.c:500
__device_attach+0x2c7/0x450 drivers/base/dd.c:1098
device_initial_probe+0xa1/0xd0 drivers/base/dd.c:1153
bus_probe_device+0x12d/0x220 drivers/base/bus.c:620
device_add+0x7d7/0xb80 drivers/base/core.c:3772
nsim_bus_dev_new drivers/net/netdevsim/bus.c:471 [inline]
new_device_store+0x37b/0x710 drivers/net/netdevsim/bus.c:191
kernfs_fop_write_iter+0x3a5/0x540 fs/kernfs/file.c:345
new_sync_write fs/read_write.c:595 [inline]
vfs_write+0x61e/0xbb0 fs/read_write.c:687
Call trace for netdevsim3[10] +1 at
__dev_hold include/linux/netdevice.h:4523 [inline]
netdev_hold include/linux/netdevice.h:4566 [inline]
neigh_parms_alloc+0x192/0x540 net/core/neighbour.c:1773
ipv6_add_dev+0x44b/0x1420 net/ipv6/addrconf.c:403
addrconf_notify+0x771/0x1050 net/ipv6/addrconf.c:3685
notifier_call_chain+0x1a5/0x3d0 kernel/notifier.c:85
call_netdevice_notifiers_extack net/core/dev.c:2292 [inline]
call_netdevice_notifiers net/core/dev.c:2306 [inline]
register_netdevice+0x18c0/0x1ed0 net/core/dev.c:11490
nsim_init_netdevsim drivers/net/netdevsim/netdev.c:1070 [inline]
nsim_create+0xbe9/0x1160 drivers/net/netdevsim/netdev.c:1152
__nsim_dev_port_add+0x7f8/0xcd0 drivers/net/netdevsim/dev.c:1509
nsim_dev_port_add_all+0x37/0xf0 drivers/net/netdevsim/dev.c:1570
nsim_drv_probe+0x8d6/0xc00 drivers/net/netdevsim/dev.c:1731
call_driver_probe drivers/base/dd.c:-1 [inline]
really_probe+0x254/0xae0 drivers/base/dd.c:706
__driver_probe_device+0x1e8/0x360 drivers/base/dd.c:868
driver_probe_device+0x4f/0x240 drivers/base/dd.c:898
__device_attach_driver+0x270/0x410 drivers/base/dd.c:1026
bus_for_each_drv+0x25b/0x2f0 drivers/base/bus.c:500
__device_attach+0x2c7/0x450 drivers/base/dd.c:1098
device_initial_probe+0xa1/0xd0 drivers/base/dd.c:1153
bus_probe_device+0x12d/0x220 drivers/base/bus.c:620
device_add+0x7d7/0xb80 drivers/base/core.c:3772
nsim_bus_dev_new drivers/net/netdevsim/bus.c:471 [inline]
new_device_store+0x37b/0x710 drivers/net/netdevsim/bus.c:191
kernfs_fop_write_iter+0x3a5/0x540 fs/kernfs/file.c:345
Call trace for netdevsim3[11] +1 at
__dev_hold include/linux/netdevice.h:4523 [inline]
netdev_hold include/linux/netdevice.h:4566 [inline]
ipv6_add_dev+0x4ec/0x1420 net/ipv6/addrconf.c:411
addrconf_notify+0x771/0x1050 net/ipv6/addrconf.c:3685
notifier_call_chain+0x1a5/0x3d0 kernel/notifier.c:85
call_netdevice_notifiers_extack net/core/dev.c:2292 [inline]
call_netdevice_notifiers net/core/dev.c:2306 [inline]
register_netdevice+0x18c0/0x1ed0 net/core/dev.c:11490
nsim_init_netdevsim drivers/net/netdevsim/netdev.c:1070 [inline]
nsim_create+0xbe9/0x1160 drivers/net/netdevsim/netdev.c:1152
__nsim_dev_port_add+0x7f8/0xcd0 drivers/net/netdevsim/dev.c:1509
nsim_dev_port_add_all+0x37/0xf0 drivers/net/netdevsim/dev.c:1570
nsim_drv_probe+0x8d6/0xc00 drivers/net/netdevsim/dev.c:1731
call_driver_probe drivers/base/dd.c:-1 [inline]
really_probe+0x254/0xae0 drivers/base/dd.c:706
__driver_probe_device+0x1e8/0x360 drivers/base/dd.c:868
driver_probe_device+0x4f/0x240 drivers/base/dd.c:898
__device_attach_driver+0x270/0x410 drivers/base/dd.c:1026
bus_for_each_drv+0x25b/0x2f0 drivers/base/bus.c:500
__device_attach+0x2c7/0x450 drivers/base/dd.c:1098
device_initial_probe+0xa1/0xd0 drivers/base/dd.c:1153
bus_probe_device+0x12d/0x220 drivers/base/bus.c:620
device_add+0x7d7/0xb80 drivers/base/core.c:3772
nsim_bus_dev_new drivers/net/netdevsim/bus.c:471 [inline]
new_device_store+0x37b/0x710 drivers/net/netdevsim/bus.c:191
kernfs_fop_write_iter+0x3a5/0x540 fs/kernfs/file.c:345
new_sync_write fs/read_write.c:595 [inline]
vfs_write+0x61e/0xbb0 fs/read_write.c:687
Call trace for netdevsim3[12] +1 at
__dev_hold include/linux/netdevice.h:4523 [inline]
netdev_hold include/linux/netdevice.h:4566 [inline]
dev_hold include/linux/netdevice.h:4589 [inline]
udp_tunnel_nic_register net/ipv4/udp_tunnel_nic.c:850 [inline]
udp_tunnel_nic_netdevice_event+0xb21/0x1870 net/ipv4/udp_tunnel_nic.c:931
notifier_call_chain+0x1a5/0x3d0 kernel/notifier.c:85
call_netdevice_notifiers_extack net/core/dev.c:2292 [inline]
call_netdevice_notifiers net/core/dev.c:2306 [inline]
register_netdevice+0x18c0/0x1ed0 net/core/dev.c:11490
nsim_init_netdevsim drivers/net/netdevsim/netdev.c:1070 [inline]
nsim_create+0xbe9/0x1160 drivers/net/netdevsim/netdev.c:1152
__nsim_dev_port_add+0x7f8/0xcd0 drivers/net/netdevsim/dev.c:1509
nsim_dev_port_add_all+0x37/0xf0 drivers/net/netdevsim/dev.c:1570
nsim_drv_probe+0x8d6/0xc00 drivers/net/netdevsim/dev.c:1731
call_driver_probe drivers/base/dd.c:-1 [inline]
really_probe+0x254/0xae0 drivers/base/dd.c:706
__driver_probe_device+0x1e8/0x360 drivers/base/dd.c:868
driver_probe_device+0x4f/0x240 drivers/base/dd.c:898
__device_attach_driver+0x270/0x410 drivers/base/dd.c:1026
bus_for_each_drv+0x25b/0x2f0 drivers/base/bus.c:500
__device_attach+0x2c7/0x450 drivers/base/dd.c:1098
device_initial_probe+0xa1/0xd0 drivers/base/dd.c:1153
bus_probe_device+0x12d/0x220 drivers/base/bus.c:620
device_add+0x7d7/0xb80 drivers/base/core.c:3772
nsim_bus_dev_new drivers/net/netdevsim/bus.c:471 [inline]
new_device_store+0x37b/0x710 drivers/net/netdevsim/bus.c:191
kernfs_fop_write_iter+0x3a5/0x540 fs/kernfs/file.c:345
new_sync_write fs/read_write.c:595 [inline]
vfs_write+0x61e/0xbb0 fs/read_write.c:687
ksys_write+0x156/0x270 fs/read_write.c:739
Call trace for netdevsim3[13] +1 at
__dev_hold include/linux/netdevice.h:4523 [inline]
netdev_hold include/linux/netdevice.h:4566 [inline]
netdev_work_enqueue+0x15e/0x2b0 net/core/netdev_work.c:36
dev_set_rx_mode+0x66/0xa0 net/core/dev_addr_lists.c:1393
__dev_open+0x691/0x850 net/core/dev.c:1710
__dev_change_flags+0x329/0x820 net/core/dev.c:9764
netif_change_flags+0x7c/0x1b0 net/core/dev.c:9829
do_setlink+0xdd6/0x4670 net/core/rtnetlink.c:3246
rtnl_changelink net/core/rtnetlink.c:3885 [inline]
__rtnl_newlink net/core/rtnetlink.c:4056 [inline]
rtnl_newlink+0x15a3/0x1c30 net/core/rtnetlink.c:4195
rtnetlink_rcv_msg+0x802/0xc00 net/core/rtnetlink.c:7112
netlink_rcv_skb+0x226/0x4a0 net/netlink/af_netlink.c:2556
netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline]
netlink_unicast+0x7f5/0x990 net/netlink/af_netlink.c:1345
netlink_sendmsg+0x813/0xb40 net/netlink/af_netlink.c:1900
sock_sendmsg_nosec+0x13a/0x180 net/socket.c:810
__sock_sendmsg net/socket.c:825 [inline]
__sys_sendto+0x41e/0x5d0 net/socket.c:2292
__do_sys_sendto net/socket.c:2299 [inline]
__se_sys_sendto net/socket.c:2295 [inline]
__x64_sys_sendto+0xde/0x100 net/socket.c:2295
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x17b/0x530 arch/x86/entry/syscall_64.c:85
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Call trace for netdevsim3[14] +1 at
__dev_hold include/linux/netdevice.h:4523 [inline]
netdev_hold include/linux/netdevice.h:4566 [inline]
qdisc_alloc+0x682/0xa00 net/sched/sch_generic.c:1030
qdisc_create_dflt+0x8e/0x4e0 net/sched/sch_generic.c:1053
attach_one_default_qdisc net/sched/sch_generic.c:1219 [inline]
netdev_for_each_tx_queue include/linux/netdevice.h:2745 [inline]
attach_default_qdiscs net/sched/sch_generic.c:1237 [inline]
dev_activate+0x37a/0x1150 net/sched/sch_generic.c:1296
__dev_open+0x699/0x850 net/core/dev.c:1711
__dev_change_flags+0x329/0x820 net/core/dev.c:9764
netif_change_flags+0x7c/0x1b0 net/core/dev.c:9829
do_setlink+0xdd6/0x4670 net/core/rtnetlink.c:3246
rtnl_changelink net/core/rtnetlink.c:3885 [inline]
__rtnl_newlink net/core/rtnetlink.c:4056 [inline]
rtnl_newlink+0x15a3/0x1c30 net/core/rtnetlink.c:4195
rtnetlink_rcv_msg+0x802/0xc00 net/core/rtnetlink.c:7112
netlink_rcv_skb+0x226/0x4a0 net/netlink/af_netlink.c:2556
netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline]
netlink_unicast+0x7f5/0x990 net/netlink/af_netlink.c:1345
netlink_sendmsg+0x813/0xb40 net/netlink/af_netlink.c:1900
sock_sendmsg_nosec+0x13a/0x180 net/socket.c:810
Call trace for netdevsim3[15] +3 at
__dev_hold include/linux/netdevice.h:4523 [inline]
netdev_hold include/linux/netdevice.h:4566 [inline]
dev_hold include/linux/netdevice.h:4589 [inline]
netdevice_queue_work drivers/infiniband/core/roce_gid_mgmt.c:674 [inline]
netdevice_event+0x4e1/0x8c0 drivers/infiniband/core/roce_gid_mgmt.c:822
notifier_call_chain+0x1a5/0x3d0 kernel/notifier.c:85
call_netdevice_notifiers_extack net/core/dev.c:2292 [inline]
call_netdevice_notifiers net/core/dev.c:2306 [inline]
__dev_notify_flags+0x31e/0x510 net/core/dev.c:9805
netif_change_flags+0xde/0x1b0 net/core/dev.c:9834
do_setlink+0xdd6/0x4670 net/core/rtnetlink.c:3246
rtnl_changelink net/core/rtnetlink.c:3885 [inline]
__rtnl_newlink net/core/rtnetlink.c:4056 [inline]
rtnl_newlink+0x15a3/0x1c30 net/core/rtnetlink.c:4195
rtnetlink_rcv_msg+0x802/0xc00 net/core/rtnetlink.c:7112
netlink_rcv_skb+0x226/0x4a0 net/netlink/af_netlink.c:2556
netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline]
netlink_unicast+0x7f5/0x990 net/netlink/af_netlink.c:1345
netlink_sendmsg+0x813/0xb40 net/netlink/af_netlink.c:1900
sock_sendmsg_nosec+0x13a/0x180 net/socket.c:810
Call trace for netdevsim3[16] +3 at
__dev_hold include/linux/netdevice.h:4523 [inline]
netdev_hold include/linux/netdevice.h:4566 [inline]
dev_hold include/linux/netdevice.h:4589 [inline]
netdevice_queue_work drivers/infiniband/core/roce_gid_mgmt.c:675 [inline]
netdevice_event+0x592/0x8c0 drivers/infiniband/core/roce_gid_mgmt.c:822
notifier_call_chain+0x1a5/0x3d0 kernel/notifier.c:85
call_netdevice_notifiers_extack net/core/dev.c:2292 [inline]
call_netdevice_notifiers net/core/dev.c:2306 [inline]
__dev_notify_flags+0x31e/0x510 net/core/dev.c:9805
netif_change_flags+0xde/0x1b0 net/core/dev.c:9834
do_setlink+0xdd6/0x4670 net/core/rtnetlink.c:3246
rtnl_changelink net/core/rtnetlink.c:3885 [inline]
__rtnl_newlink net/core/rtnetlink.c:4056 [inline]
rtnl_newlink+0x15a3/0x1c30 net/core/rtnetlink.c:4195
rtnetlink_rcv_msg+0x802/0xc00 net/core/rtnetlink.c:7112
netlink_rcv_skb+0x226/0x4a0 net/netlink/af_netlink.c:2556
netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline]
netlink_unicast+0x7f5/0x990 net/netlink/af_netlink.c:1345
netlink_sendmsg+0x813/0xb40 net/netlink/af_netlink.c:1900
sock_sendmsg_nosec+0x13a/0x180 net/socket.c:810
Call trace for netdevsim3[17] +1 at
__dev_hold include/linux/netdevice.h:4523 [inline]
netdev_hold include/linux/netdevice.h:4566 [inline]
dev_hold include/linux/netdevice.h:4589 [inline]
dev_get_by_index+0x1ae/0x2e0 net/core/dev.c:1002
netdev_get_by_index+0x25/0xb0 net/core/dev.c:1025
fib6_nh_init+0x285/0x1e60 net/ipv6/route.c:3615
ip6_route_info_create_nh+0x16a/0xad0 net/ipv6/route.c:3914
ip6_route_add+0x6e/0x1d0 net/ipv6/route.c:3966
addrconf_add_mroute+0x2d1/0x370 net/ipv6/addrconf.c:2568
addrconf_add_dev net/ipv6/addrconf.c:2586 [inline]
addrconf_dev_config net/ipv6/addrconf.c:3507 [inline]
addrconf_init_auto_addrs+0x4d7/0xa50 net/ipv6/addrconf.c:3595
addrconf_notify+0xb1e/0x1050 net/ipv6/addrconf.c:3775
notifier_call_chain+0x1a5/0x3d0 kernel/notifier.c:85
call_netdevice_notifiers_extack net/core/dev.c:2292 [inline]
call_netdevice_notifiers net/core/dev.c:2306 [inline]
__dev_notify_flags+0x31e/0x510 net/core/dev.c:9805
netif_change_flags+0xde/0x1b0 net/core/dev.c:9834
do_setlink+0xdd6/0x4670 net/core/rtnetlink.c:3246
rtnl_changelink net/core/rtnetlink.c:3885 [inline]
__rtnl_newlink net/core/rtnetlink.c:4056 [inline]
rtnl_newlink+0x15a3/0x1c30 net/core/rtnetlink.c:4195
rtnetlink_rcv_msg+0x802/0xc00 net/core/rtnetlink.c:7112
netlink_rcv_skb+0x226/0x4a0 net/netlink/af_netlink.c:2556
netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline]
netlink_unicast+0x7f5/0x990 net/netlink/af_netlink.c:1345
netlink_sendmsg+0x813/0xb40 net/netlink/af_netlink.c:1900
sock_sendmsg_nosec+0x13a/0x180 net/socket.c:810
Call trace for netdevsim3[18] +1 at
__dev_hold include/linux/netdevice.h:4523 [inline]
netdev_hold include/linux/netdevice.h:4566 [inline]
dev_hold include/linux/netdevice.h:4589 [inline]
dev_get_by_index+0x1ae/0x2e0 net/core/dev.c:1002
netdev_get_by_index+0x25/0xb0 net/core/dev.c:1025
fib6_nh_init+0x285/0x1e60 net/ipv6/route.c:3615
ip6_route_info_create_nh+0x16a/0xad0 net/ipv6/route.c:3914
addrconf_f6i_alloc+0x3b7/0x630 net/ipv6/route.c:4706
ipv6_add_addr+0x59c/0x11b0 net/ipv6/addrconf.c:1132
addrconf_add_linklocal+0x209/0x490 net/ipv6/addrconf.c:3334
addrconf_addr_gen+0x2f8/0x360 net/ipv6/addrconf.c:3470
addrconf_notify+0xb1e/0x1050 net/ipv6/addrconf.c:3775
notifier_call_chain+0x1a5/0x3d0 kernel/notifier.c:85
call_netdevice_notifiers_extack net/core/dev.c:2292 [inline]
call_netdevice_notifiers net/core/dev.c:2306 [inline]
__dev_notify_flags+0x31e/0x510 net/core/dev.c:9805
netif_change_flags+0xde/0x1b0 net/core/dev.c:9834
do_setlink+0xdd6/0x4670 net/core/rtnetlink.c:3246
rtnl_changelink net/core/rtnetlink.c:3885 [inline]
__rtnl_newlink net/core/rtnetlink.c:4056 [inline]
rtnl_newlink+0x15a3/0x1c30 net/core/rtnetlink.c:4195
rtnetlink_rcv_msg+0x802/0xc00 net/core/rtnetlink.c:7112
netlink_rcv_skb+0x226/0x4a0 net/netlink/af_netlink.c:2556
netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline]
netlink_unicast+0x7f5/0x990 net/netlink/af_netlink.c:1345
netlink_sendmsg+0x813/0xb40 net/netlink/af_netlink.c:1900
sock_sendmsg_nosec+0x13a/0x180 net/socket.c:810
Call trace for netdevsim3[19] +1 at
__dev_hold include/linux/netdevice.h:4523 [inline]
netdev_hold include/linux/netdevice.h:4566 [inline]
dev_hold include/linux/netdevice.h:4589 [inline]
addr_event+0x302/0x480 drivers/infiniband/core/roce_gid_mgmt.c:870
inet6addr_event+0x9f/0xd0 drivers/infiniband/core/roce_gid_mgmt.c:903
notifier_call_chain+0x1a5/0x3d0 kernel/notifier.c:85
atomic_notifier_call_chain+0xda/0x180 kernel/notifier.c:223
ipv6_add_addr+0xeb6/0x11b0 net/ipv6/addrconf.c:1193
addrconf_add_linklocal+0x209/0x490 net/ipv6/addrconf.c:3334
addrconf_addr_gen+0x2f8/0x360 net/ipv6/addrconf.c:3470
addrconf_notify+0xb1e/0x1050 net/ipv6/addrconf.c:3775
notifier_call_chain+0x1a5/0x3d0 kernel/notifier.c:85
call_netdevice_notifiers_extack net/core/dev.c:2292 [inline]
call_netdevice_notifiers net/core/dev.c:2306 [inline]
__dev_notify_flags+0x31e/0x510 net/core/dev.c:9805
netif_change_flags+0xde/0x1b0 net/core/dev.c:9834
do_setlink+0xdd6/0x4670 net/core/rtnetlink.c:3246
rtnl_changelink net/core/rtnetlink.c:3885 [inline]
__rtnl_newlink net/core/rtnetlink.c:4056 [inline]
rtnl_newlink+0x15a3/0x1c30 net/core/rtnetlink.c:4195
rtnetlink_rcv_msg+0x802/0xc00 net/core/rtnetlink.c:7112
netlink_rcv_skb+0x226/0x4a0 net/netlink/af_netlink.c:2556
netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline]
netlink_unicast+0x7f5/0x990 net/netlink/af_netlink.c:1345
netlink_sendmsg+0x813/0xb40 net/netlink/af_netlink.c:1900
sock_sendmsg_nosec+0x13a/0x180 net/socket.c:810
Call trace for netdevsim3[20] -2 at
__dev_put include/linux/netdevice.h:4509 [inline]
netdev_put include/linux/netdevice.h:4576 [inline]
dev_put include/linux/netdevice.h:4601 [inline]
update_gid_event_work_handler+0x84/0xf0 drivers/infiniband/core/roce_gid_mgmt.c:834
process_one_work+0xaaf/0x1480 kernel/workqueue.c:3379
Call trace for netdevsim3[21] +1 at
__dev_hold include/linux/netdevice.h:4523 [inline]
netdev_hold include/linux/netdevice.h:4566 [inline]
dev_hold include/linux/netdevice.h:4589 [inline]
dev_get_by_index+0x1ae/0x2e0 net/core/dev.c:1002
netdev_get_by_index+0x25/0xb0 net/core/dev.c:1025
fib6_nh_init+0x285/0x1e60 net/ipv6/route.c:3615
ip6_route_info_create_nh+0x16a/0xad0 net/ipv6/route.c:3914
ip6_route_add+0x6e/0x1d0 net/ipv6/route.c:3966
addrconf_prefix_route+0x3a2/0x480 net/ipv6/addrconf.c:2504
addrconf_add_linklocal+0x262/0x490 net/ipv6/addrconf.c:3336
addrconf_addr_gen+0x2f8/0x360 net/ipv6/addrconf.c:3470
addrconf_notify+0xb1e/0x1050 net/ipv6/addrconf.c:3775
notifier_call_chain+0x1a5/0x3d0 kernel/notifier.c:85
call_netdevice_notifiers_extack net/core/dev.c:2292 [inline]
call_netdevice_notifiers net/core/dev.c:2306 [inline]
__dev_notify_flags+0x31e/0x510 net/core/dev.c:9805
netif_change_flags+0xde/0x1b0 net/core/dev.c:9834
do_setlink+0xdd6/0x4670 net/core/rtnetlink.c:3246
rtnl_changelink net/core/rtnetlink.c:3885 [inline]
__rtnl_newlink net/core/rtnetlink.c:4056 [inline]
rtnl_newlink+0x15a3/0x1c30 net/core/rtnetlink.c:4195
rtnetlink_rcv_msg+0x802/0xc00 net/core/rtnetlink.c:7112
netlink_rcv_skb+0x226/0x4a0 net/netlink/af_netlink.c:2556
netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline]
netlink_unicast+0x7f5/0x990 net/netlink/af_netlink.c:1345
netlink_sendmsg+0x813/0xb40 net/netlink/af_netlink.c:1900
sock_sendmsg_nosec+0x13a/0x180 net/socket.c:810
Call trace for netdevsim3[22] -1 at
__dev_put include/linux/netdevice.h:4509 [inline]
netdev_put include/linux/netdevice.h:4576 [inline]
netdev_work_dequeue+0x23e/0x2d0 net/core/netdev_work.c:57
netif_rx_mode_sync+0x1c/0x50 net/core/dev_addr_lists.c:1410
do_setlink+0x3c9f/0x4670 net/core/rtnetlink.c:3500
rtnl_changelink net/core/rtnetlink.c:3885 [inline]
__rtnl_newlink net/core/rtnetlink.c:4056 [inline]
rtnl_newlink+0x15a3/0x1c30 net/core/rtnetlink.c:4195
rtnetlink_rcv_msg+0x802/0xc00 net/core/rtnetlink.c:7112
netlink_rcv_skb+0x226/0x4a0 net/netlink/af_netlink.c:2556
netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline]
netlink_unicast+0x7f5/0x990 net/netlink/af_netlink.c:1345
netlink_sendmsg+0x813/0xb40 net/netlink/af_netlink.c:1900
sock_sendmsg_nosec+0x13a/0x180 net/socket.c:810
__sock_sendmsg net/socket.c:825 [inline]
__sys_sendto+0x41e/0x5d0 net/socket.c:2292
__do_sys_sendto net/socket.c:2299 [inline]
__se_sys_sendto net/socket.c:2295 [inline]
__x64_sys_sendto+0xde/0x100 net/socket.c:2295
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x17b/0x530 arch/x86/entry/syscall_64.c:85
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Call trace for netdevsim3[23] +1 at
__dev_hold include/linux/netdevice.h:4523 [inline]
netdev_hold include/linux/netdevice.h:4566 [inline]
netdev_work_enqueue+0x15e/0x2b0 net/core/netdev_work.c:36
__dev_mc_add net/core/dev_addr_lists.c:1002 [inline]
dev_mc_add+0xd2/0x140 net/core/dev_addr_lists.c:1016
igmp6_group_added+0x22b/0x7c0 net/ipv6/mcast.c:681
__ipv6_dev_mc_inc+0x88e/0xa40 net/ipv6/mcast.c:973
addrconf_join_solict net/ipv6/addrconf.c:2262 [inline]
addrconf_dad_begin net/ipv6/addrconf.c:4134 [inline]
addrconf_dad_work+0x5dd/0x16e0 net/ipv6/addrconf.c:4262
process_one_work+0xaaf/0x1480 kernel/workqueue.c:3379
process_scheduled_works kernel/workqueue.c:3462 [inline]
worker_thread+0xb05/0x10d0 kernel/workqueue.c:3543
kthread+0x388/0x470 kernel/kthread.c:436
ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
Call trace for netdevsim3[24] +2 at
__dev_hold include/linux/netdevice.h:4523 [inline]
netdev_hold include/linux/netdevice.h:4566 [inline]
dst_init+0x59/0x490 net/core/dst.c:128
dst_alloc+0x12a/0x170 net/core/dst.c:171
ip6_dst_alloc net/ipv6/route.c:342 [inline]
icmp6_dst_alloc+0x75/0x450 net/ipv6/route.c:3346
mld_sendpack+0x697/0xe10 net/ipv6/mcast.c:1859
mld_send_cr net/ipv6/mcast.c:2171 [inline]
mld_ifc_work+0x842/0xd60 net/ipv6/mcast.c:2711
process_one_work+0xaaf/0x1480 kernel/workqueue.c:3379
Call trace for netdevsim3[25] +1 at
__dev_hold include/linux/netdevice.h:4523 [inline]
netdev_hold include/linux/netdevice.h:4566 [inline]
___neigh_create+0xd54/0x23a0 net/core/neighbour.c:661
ip6_finish_output2+0x6d6/0x1410 net/ipv6/ip6_output.c:128
NF_HOOK_COND include/linux/netfilter.h:314 [inline]
ip6_output+0x337/0x540 net/ipv6/ip6_output.c:246
dst_output include/net/dst.h:489 [inline]
NF_HOOK+0x177/0x4f0 include/linux/netfilter.h:325
mld_sendpack+0x890/0xe10 net/ipv6/mcast.c:1870
mld_send_cr net/ipv6/mcast.c:2171 [inline]
mld_ifc_work+0x842/0xd60 net/ipv6/mcast.c:2711
process_one_work+0xaaf/0x1480 kernel/workqueue.c:3379
Call trace for netdevsim3[26] +1 at
__dev_hold include/linux/netdevice.h:4523 [inline]
netdev_hold include/linux/netdevice.h:4566 [inline]
netdev_work_proc+0xdc/0x7f0 net/core/netdev_work.c:136
process_one_work+0xaaf/0x1480 kernel/workqueue.c:3379
process_scheduled_works kernel/workqueue.c:3462 [inline]
worker_thread+0xb05/0x10d0 kernel/workqueue.c:3543
kthread+0x388/0x470 kernel/kthread.c:436
ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
Call trace for netdevsim3[27] -1 at
__dev_put include/linux/netdevice.h:4509 [inline]
netdev_put include/linux/netdevice.h:4576 [inline]
netdev_work_proc+0x3c5/0x7f0 net/core/netdev_work.c:148
process_one_work+0xaaf/0x1480 kernel/workqueue.c:3379
process_scheduled_works kernel/workqueue.c:3462 [inline]
worker_thread+0xb05/0x10d0 kernel/workqueue.c:3543
kthread+0x388/0x470 kernel/kthread.c:436
ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
Call trace for netdevsim3[28] -1 at
__dev_put include/linux/netdevice.h:4509 [inline]
netdev_put include/linux/netdevice.h:4576 [inline]
netdev_work_proc+0x64e/0x7f0 net/core/netdev_work.c:158
process_one_work+0xaaf/0x1480 kernel/workqueue.c:3379
Call trace for netdevsim3[29] -11 at
__dev_put include/linux/netdevice.h:4509 [inline]
netdev_put include/linux/netdevice.h:4576 [inline]
dst_destroy+0x13e/0x590 net/core/dst.c:192
rcu_do_batch kernel/rcu/tree.c:2645 [inline]
rcu_core kernel/rcu/tree.c:2897 [inline]
rcu_cpu_kthread+0x950/0x1480 kernel/rcu/tree.c:2985
smpboot_thread_fn+0x57c/0xa80 kernel/smpboot.c:160
kthread+0x388/0x470 kernel/kthread.c:436
ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
Call trace for netdevsim3[30] +1 at
__dev_hold include/linux/netdevice.h:4523 [inline]
netdev_hold include/linux/netdevice.h:4566 [inline]
dst_init+0x59/0x490 net/core/dst.c:128
dst_alloc+0x12a/0x170 net/core/dst.c:171
ip6_dst_alloc net/ipv6/route.c:342 [inline]
icmp6_dst_alloc+0x75/0x450 net/ipv6/route.c:3346
ndisc_send_skb+0x42f/0x1650 net/ipv6/ndisc.c:491
ndisc_send_ns+0xd7/0x160 net/ipv6/ndisc.c:671
addrconf_dad_work+0xc37/0x16e0 net/ipv6/addrconf.c:4317
process_one_work+0xaaf/0x1480 kernel/workqueue.c:3379
Call trace for netdevsim3[31] +1 at
__dev_hold include/linux/netdevice.h:4523 [inline]
netdev_hold include/linux/netdevice.h:4566 [inline]
___neigh_create+0xd54/0x23a0 net/core/neighbour.c:661
ip6_finish_output2+0x6d6/0x1410 net/ipv6/ip6_output.c:128
NF_HOOK_COND include/linux/netfilter.h:314 [inline]
ip6_output+0x337/0x540 net/ipv6/ip6_output.c:246
dst_output include/net/dst.h:489 [inline]
NF_HOOK include/linux/netfilter.h:325 [inline]
ndisc_send_skb+0xcb2/0x1650 net/ipv6/ndisc.c:512
ndisc_send_ns+0xd7/0x160 net/ipv6/ndisc.c:671
addrconf_dad_work+0xc37/0x16e0 net/ipv6/addrconf.c:4317
process_one_work+0xaaf/0x1480 kernel/workqueue.c:3379
Call trace for netdevsim3[32] +1 at
__dev_hold include/linux/netdevice.h:4523 [inline]
netdev_hold include/linux/netdevice.h:4566 [inline]
dst_init+0x59/0x490 net/core/dst.c:128
dst_alloc+0x12a/0x170 net/core/dst.c:171
ip6_dst_alloc net/ipv6/route.c:342 [inline]
icmp6_dst_alloc+0x75/0x450 net/ipv6/route.c:3346
mld_sendpack+0x697/0xe10 net/ipv6/mcast.c:1859
ipv6_mc_dad_complete+0x87/0x410 net/ipv6/mcast.c:2296
addrconf_dad_completed+0x622/0xe60 net/ipv6/addrconf.c:4375
addrconf_dad_work+0xdda/0x16e0 net/ipv6/addrconf.c:-1
process_one_work+0xaaf/0x1480 kernel/workqueue.c:3379
Call trace for netdevsim3[33] +1 at
__dev_hold include/linux/netdevice.h:4523 [inline]
netdev_hold include/linux/netdevice.h:4566 [inline]
dst_init+0x59/0x490 net/core/dst.c:128
dst_alloc+0x12a/0x170 net/core/dst.c:171
ip6_dst_alloc net/ipv6/route.c:342 [inline]
icmp6_dst_alloc+0x75/0x450 net/ipv6/route.c:3346
ndisc_send_skb+0x42f/0x1650 net/ipv6/ndisc.c:491
addrconf_dad_completed+0x6e3/0xe60 net/ipv6/addrconf.c:4395
addrconf_dad_work+0xdda/0x16e0 net/ipv6/addrconf.c:-1
process_one_work+0xaaf/0x1480 kernel/workqueue.c:3379
Call trace for netdevsim3[34] +1 at
__dev_hold include/linux/netdevice.h:4523 [inline]
netdev_hold include/linux/netdevice.h:4566 [inline]
___neigh_create+0xd54/0x23a0 net/core/neighbour.c:661
ip6_finish_output2+0x6d6/0x1410 net/ipv6/ip6_output.c:128
NF_HOOK_COND include/linux/netfilter.h:314 [inline]
ip6_output+0x337/0x540 net/ipv6/ip6_output.c:246
dst_output include/net/dst.h:489 [inline]
NF_HOOK include/linux/netfilter.h:325 [inline]
ndisc_send_skb+0xcb2/0x1650 net/ipv6/ndisc.c:512
addrconf_dad_completed+0x6e3/0xe60 net/ipv6/addrconf.c:4395
addrconf_dad_work+0xdda/0x16e0 net/ipv6/addrconf.c:-1
process_one_work+0xaaf/0x1480 kernel/workqueue.c:3379
Call trace for netdevsim3[35] +1 at
__dev_hold include/linux/netdevice.h:4523 [inline]
netdev_hold include/linux/netdevice.h:4566 [inline]
dst_init+0x59/0x490 net/core/dst.c:128
dst_alloc+0x12a/0x170 net/core/dst.c:171
ip6_dst_alloc net/ipv6/route.c:342 [inline]
icmp6_dst_alloc+0x75/0x450 net/ipv6/route.c:3346
mld_sendpack+0x697/0xe10 net/ipv6/mcast.c:1859
mld_dad_work+0x3d/0x480 net/ipv6/mcast.c:2311
process_one_work+0xaaf/0x1480 kernel/workqueue.c:3379
Call trace for netdevsim3[36] +5 at
__dev_hold include/linux/netdevice.h:4523 [inline]
netdev_hold include/linux/netdevice.h:4566 [inline]
dst_init+0x59/0x490 net/core/dst.c:128
dst_alloc+0x12a/0x170 net/core/dst.c:171
ip6_dst_alloc net/ipv6/route.c:342 [inline]
icmp6_dst_alloc+0x75/0x450 net/ipv6/route.c:3346
ndisc_send_skb+0x42f/0x1650 net/ipv6/ndisc.c:491
addrconf_rs_timer+0x2d2/0x6c0 net/ipv6/addrconf.c:4072
call_timer_fn+0x192/0x5e0 kernel/time/timer.c:1748
expire_timers kernel/time/timer.c:1799 [inline]
__run_timers kernel/time/timer.c:2374 [inline]
__run_timer_base+0x67b/0x9b0 kernel/time/timer.c:2386
run_timer_base kernel/time/timer.c:2395 [inline]
run_timer_softirq+0xb7/0x170 kernel/time/timer.c:2405
handle_softirqs+0x1d9/0x6c0 kernel/softirq.c:626
Call trace for netdevsim3[37] -1 at
__dev_put include/linux/netdevice.h:4509 [inline]
netdev_put include/linux/netdevice.h:4576 [inline]
neigh_destroy+0x383/0x5f0 net/core/neighbour.c:937
neigh_remove_one+0x44c/0x4a0 net/core/neighbour.c:249
neigh_forced_gc net/core/neighbour.c:280 [inline]
neigh_alloc net/core/neighbour.c:509 [inline]
___neigh_create+0x4ac/0x23a0 net/core/neighbour.c:652
ip6_finish_output2+0x6d6/0x1410 net/ipv6/ip6_output.c:128
NF_HOOK_COND include/linux/netfilter.h:314 [inline]
ip6_output+0x337/0x540 net/ipv6/ip6_output.c:246
dst_output include/net/dst.h:489 [inline]
NF_HOOK include/linux/netfilter.h:325 [inline]
ndisc_send_skb+0xcb2/0x1650 net/ipv6/ndisc.c:512
ndisc_send_ns+0xd7/0x160 net/ipv6/ndisc.c:671
addrconf_dad_work+0xc37/0x16e0 net/ipv6/addrconf.c:4317
process_one_work+0xaaf/0x1480 kernel/workqueue.c:3379
process_scheduled_works kernel/workqueue.c:3462 [inline]
worker_thread+0xb05/0x10d0 kernel/workqueue.c:3543
kthread+0x388/0x470 kernel/kthread.c:436
ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
Call trace for netdevsim3[38] -1 at
__dev_put include/linux/netdevice.h:4509 [inline]
netdev_put include/linux/netdevice.h:4576 [inline]
neigh_destroy+0x383/0x5f0 net/core/neighbour.c:937
neigh_remove_one+0x44c/0x4a0 net/core/neighbour.c:249
neigh_forced_gc net/core/neighbour.c:280 [inline]
neigh_alloc net/core/neighbour.c:509 [inline]
___neigh_create+0x4ac/0x23a0 net/core/neighbour.c:652
ip6_finish_output2+0x6d6/0x1410 net/ipv6/ip6_output.c:128
NF_HOOK_COND include/linux/netfilter.h:314 [inline]
ip6_output+0x337/0x540 net/ipv6/ip6_output.c:246
dst_output include/net/dst.h:489 [inline]
NF_HOOK+0x177/0x4f0 include/linux/netfilter.h:325
mld_sendpack+0x890/0xe10 net/ipv6/mcast.c:1870
mld_send_cr net/ipv6/mcast.c:2171 [inline]
mld_ifc_work+0x842/0xd60 net/ipv6/mcast.c:2711
process_one_work+0xaaf/0x1480 kernel/workqueue.c:3379
process_scheduled_works kernel/workqueue.c:3462 [inline]
worker_thread+0xb05/0x10d0 kernel/workqueue.c:3543
kthread+0x388/0x470 kernel/kthread.c:436
ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
Call trace for netdevsim3[39] -1 at
__dev_put include/linux/netdevice.h:4509 [inline]
netdev_put include/linux/netdevice.h:4576 [inline]
neigh_destroy+0x383/0x5f0 net/core/neighbour.c:937
neigh_remove_one+0x44c/0x4a0 net/core/neighbour.c:249
neigh_forced_gc net/core/neighbour.c:280 [inline]
neigh_alloc net/core/neighbour.c:509 [inline]
___neigh_create+0x4ac/0x23a0 net/core/neighbour.c:652
ip6_finish_output2+0x6d6/0x1410 net/ipv6/ip6_output.c:128
NF_HOOK_COND include/linux/netfilter.h:314 [inline]
ip6_output+0x337/0x540 net/ipv6/ip6_output.c:246
dst_output include/net/dst.h:489 [inline]
NF_HOOK include/linux/netfilter.h:325 [inline]
ndisc_send_skb+0xcb2/0x1650 net/ipv6/ndisc.c:512
addrconf_rs_timer+0x2d2/0x6c0 net/ipv6/addrconf.c:4072
call_timer_fn+0x192/0x5e0 kernel/time/timer.c:1748
expire_timers kernel/time/timer.c:1799 [inline]
__run_timers kernel/time/timer.c:2374 [inline]
__run_timer_base+0x67b/0x9b0 kernel/time/timer.c:2386
run_timer_base kernel/time/timer.c:2395 [inline]
run_timer_softirq+0xb7/0x170 kernel/time/timer.c:2405
handle_softirqs+0x1d9/0x6c0 kernel/softirq.c:626
Call trace for netdevsim3[40] +2 at
__dev_hold include/linux/netdevice.h:4523 [inline]
netdev_hold include/linux/netdevice.h:4566 [inline]
___neigh_create+0xd54/0x23a0 net/core/neighbour.c:661
ip6_finish_output2+0x6d6/0x1410 net/ipv6/ip6_output.c:128
NF_HOOK_COND include/linux/netfilter.h:314 [inline]
ip6_output+0x337/0x540 net/ipv6/ip6_output.c:246
dst_output include/net/dst.h:489 [inline]
NF_HOOK include/linux/netfilter.h:325 [inline]
ndisc_send_skb+0xcb2/0x1650 net/ipv6/ndisc.c:512
addrconf_rs_timer+0x2d2/0x6c0 net/ipv6/addrconf.c:4072
call_timer_fn+0x192/0x5e0 kernel/time/timer.c:1748
expire_timers kernel/time/timer.c:1799 [inline]
__run_timers kernel/time/timer.c:2374 [inline]
__run_timer_base+0x67b/0x9b0 kernel/time/timer.c:2386
run_timer_base kernel/time/timer.c:2395 [inline]
run_timer_softirq+0xb7/0x170 kernel/time/timer.c:2405
handle_softirqs+0x1d9/0x6c0 kernel/softirq.c:626
Call trace for netdevsim3[41] -1 at
__dev_put include/linux/netdevice.h:4509 [inline]
netdev_put include/linux/netdevice.h:4576 [inline]
neigh_destroy+0x383/0x5f0 net/core/neighbour.c:937
neigh_periodic_work+0xb7b/0xe90 net/core/neighbour.c:1026
process_one_work+0xaaf/0x1480 kernel/workqueue.c:3379
process_scheduled_works kernel/workqueue.c:3462 [inline]
worker_thread+0xb05/0x10d0 kernel/workqueue.c:3543
kthread+0x388/0x470 kernel/kthread.c:436
ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
Call trace for netdevsim3[42] +1 at
__dev_hold include/linux/netdevice.h:4523 [inline]
netdev_hold include/linux/netdevice.h:4566 [inline]
linkwatch_add_event net/core/link_watch.c:131 [inline]
linkwatch_fire_event+0x157/0x210 net/core/link_watch.c:324
nsim_stop+0x88/0x430 drivers/net/netdevsim/netdev.c:550
__dev_close_many+0x366/0x6e0 net/core/dev.c:1776
netif_close_many+0x249/0x660 net/core/dev.c:1802
netif_close net/core/dev.c:1820 [inline]
__dev_change_net_namespace+0x8d9/0x1de0 net/core/dev.c:12753
do_setlink+0x2d1/0x4670 net/core/rtnetlink.c:3148
rtnl_changelink net/core/rtnetlink.c:3885 [inline]
__rtnl_newlink net/core/rtnetlink.c:4056 [inline]
rtnl_newlink+0x15a3/0x1c30 net/core/rtnetlink.c:4195
rtnetlink_rcv_msg+0x802/0xc00 net/core/rtnetlink.c:7112
netlink_rcv_skb+0x226/0x4a0 net/netlink/af_netlink.c:2556
netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline]
netlink_unicast+0x7f5/0x990 net/netlink/af_netlink.c:1345
netlink_sendmsg+0x813/0xb40 net/netlink/af_netlink.c:1900
sock_sendmsg_nosec+0x13a/0x180 net/socket.c:810
Call trace for netdevsim3[43] -1 at
__dev_put include/linux/netdevice.h:4509 [inline]
netdev_put include/linux/netdevice.h:4576 [inline]
neigh_destroy+0x383/0x5f0 net/core/neighbour.c:937
neigh_flush_dev net/core/neighbour.c:433 [inline]
__neigh_ifdown+0x1f9/0x8f0 net/core/neighbour.c:466
neigh_ifdown+0x1f/0x30 net/core/neighbour.c:489
rt6_disable_ip+0x7af/0x820 net/ipv6/route.c:5035
addrconf_ifdown+0x157/0x1a00 net/ipv6/addrconf.c:3888
addrconf_notify+0x1bc/0x1050 net/ipv6/addrconf.c:-1
notifier_call_chain+0x1a5/0x3d0 kernel/notifier.c:85
call_netdevice_notifiers_extack net/core/dev.c:2292 [inline]
call_netdevice_notifiers net/core/dev.c:2306 [inline]
netif_close_many+0x463/0x660 net/core/dev.c:1807
netif_close net/core/dev.c:1820 [inline]
__dev_change_net_namespace+0x8d9/0x1de0 net/core/dev.c:12753
do_setlink+0x2d1/0x4670 net/core/rtnetlink.c:3148
rtnl_changelink net/core/rtnetlink.c:3885 [inline]
__rtnl_newlink net/core/rtnetlink.c:4056 [inline]
rtnl_newlink+0x15a3/0x1c30 net/core/rtnetlink.c:4195
rtnetlink_rcv_msg+0x802/0xc00 net/core/rtnetlink.c:7112
netlink_rcv_skb+0x226/0x4a0 net/netlink/af_netlink.c:2556
netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline]
netlink_unicast+0x7f5/0x990 net/netlink/af_netlink.c:1345
netlink_sendmsg+0x813/0xb40 net/netlink/af_netlink.c:1900
sock_sendmsg_nosec+0x13a/0x180 net/socket.c:810
__sock_sendmsg net/socket.c:825 [inline]
____sys_sendmsg+0x565/0x870 net/socket.c:2727
___sys_sendmsg+0x2a5/0x360 net/socket.c:2781
__sys_sendmsg net/socket.c:2813 [inline]
__do_sys_sendmsg net/socket.c:2818 [inline]
__se_sys_sendmsg net/socket.c:2816 [inline]
__x64_sys_sendmsg+0x1b7/0x290 net/socket.c:2816
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x17b/0x530 arch/x86/entry/syscall_64.c:85
Call trace for netdevsim3[44] +1 at
__dev_hold include/linux/netdevice.h:4523 [inline]
netdev_hold include/linux/netdevice.h:4566 [inline]
dev_hold include/linux/netdevice.h:4589 [inline]
addr_event+0x302/0x480 drivers/infiniband/core/roce_gid_mgmt.c:870
inet6addr_event+0x9f/0xd0 drivers/infiniband/core/roce_gid_mgmt.c:903
notifier_call_chain+0x1a5/0x3d0 kernel/notifier.c:85
atomic_notifier_call_chain+0xda/0x180 kernel/notifier.c:223
addrconf_ifdown+0xfcf/0x1a00 net/ipv6/addrconf.c:4013
addrconf_notify+0x1bc/0x1050 net/ipv6/addrconf.c:-1
notifier_call_chain+0x1a5/0x3d0 kernel/notifier.c:85
call_netdevice_notifiers_extack net/core/dev.c:2292 [inline]
call_netdevice_notifiers net/core/dev.c:2306 [inline]
netif_close_many+0x463/0x660 net/core/dev.c:1807
netif_close net/core/dev.c:1820 [inline]
__dev_change_net_namespace+0x8d9/0x1de0 net/core/dev.c:12753
do_setlink+0x2d1/0x4670 net/core/rtnetlink.c:3148
rtnl_changelink net/core/rtnetlink.c:3885 [inline]
__rtnl_newlink net/core/rtnetlink.c:4056 [inline]
rtnl_newlink+0x15a3/0x1c30 net/core/rtnetlink.c:4195
rtnetlink_rcv_msg+0x802/0xc00 net/core/rtnetlink.c:7112
netlink_rcv_skb+0x226/0x4a0 net/netlink/af_netlink.c:2556
netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline]
netlink_unicast+0x7f5/0x990 net/netlink/af_netlink.c:1345
netlink_sendmsg+0x813/0xb40 net/netlink/af_netlink.c:1900
sock_sendmsg_nosec+0x13a/0x180 net/socket.c:810
Call trace for netdevsim3[45] -3 at
__dev_put include/linux/netdevice.h:4509 [inline]
netdev_put include/linux/netdevice.h:4576 [inline]
fib_nh_common_release+0x5c/0x430 net/ipv4/fib_semantics.c:204
fib6_info_destroy_rcu+0xca/0x1c0 net/ipv6/ip6_fib.c:177
rcu_do_batch kernel/rcu/tree.c:2645 [inline]
rcu_core kernel/rcu/tree.c:2897 [inline]
rcu_cpu_kthread+0x950/0x1480 kernel/rcu/tree.c:2985
smpboot_thread_fn+0x57c/0xa80 kernel/smpboot.c:160
kthread+0x388/0x470 kernel/kthread.c:436
ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
Call trace for netdevsim3[46] -1 at
__dev_put include/linux/netdevice.h:4509 [inline]
netdev_put include/linux/netdevice.h:4576 [inline]
__qdisc_destroy+0x20e/0x480 net/sched/sch_generic.c:1126
qdisc_put net/sched/sch_generic.c:1150 [inline]
dev_shutdown+0x352/0x450 net/sched/sch_generic.c:1515
__dev_change_net_namespace+0xbc1/0x1de0 net/core/dev.c:12766
do_setlink+0x2d1/0x4670 net/core/rtnetlink.c:3148
rtnl_changelink net/core/rtnetlink.c:3885 [inline]
__rtnl_newlink net/core/rtnetlink.c:4056 [inline]
rtnl_newlink+0x15a3/0x1c30 net/core/rtnetlink.c:4195
rtnetlink_rcv_msg+0x802/0xc00 net/core/rtnetlink.c:7112
netlink_rcv_skb+0x226/0x4a0 net/netlink/af_netlink.c:2556
netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline]
netlink_unicast+0x7f5/0x990 net/netlink/af_netlink.c:1345
netlink_sendmsg+0x813/0xb40 net/netlink/af_netlink.c:1900
sock_sendmsg_nosec+0x13a/0x180 net/socket.c:810
Call trace for netdevsim3[47] +1 at
__dev_hold include/linux/netdevice.h:4523 [inline]
netdev_hold include/linux/netdevice.h:4566 [inline]
dev_hold include/linux/netdevice.h:4589 [inline]
netdevice_queue_work drivers/infiniband/core/roce_gid_mgmt.c:674 [inline]
netdevice_event+0x4e1/0x8c0 drivers/infiniband/core/roce_gid_mgmt.c:822
notifier_call_chain+0x1a5/0x3d0 kernel/notifier.c:85
call_netdevice_notifiers_extack net/core/dev.c:2292 [inline]
call_netdevice_notifiers net/core/dev.c:2306 [inline]
__dev_change_net_namespace+0xcbb/0x1de0 net/core/dev.c:12776
do_setlink+0x2d1/0x4670 net/core/rtnetlink.c:3148
rtnl_changelink net/core/rtnetlink.c:3885 [inline]
__rtnl_newlink net/core/rtnetlink.c:4056 [inline]
rtnl_newlink+0x15a3/0x1c30 net/core/rtnetlink.c:4195
rtnetlink_rcv_msg+0x802/0xc00 net/core/rtnetlink.c:7112
netlink_rcv_skb+0x226/0x4a0 net/netlink/af_netlink.c:2556
netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline]
netlink_unicast+0x7f5/0x990 net/netlink/af_netlink.c:1345
netlink_sendmsg+0x813/0xb40 net/netlink/af_netlink.c:1900
sock_sendmsg_nosec+0x13a/0x180 net/socket.c:810
Call trace for netdevsim3[48] +1 at
__dev_hold include/linux/netdevice.h:4523 [inline]
netdev_hold include/linux/netdevice.h:4566 [inline]
dev_hold include/linux/netdevice.h:4589 [inline]
netdevice_queue_work drivers/infiniband/core/roce_gid_mgmt.c:675 [inline]
netdevice_event+0x592/0x8c0 drivers/infiniband/core/roce_gid_mgmt.c:822
notifier_call_chain+0x1a5/0x3d0 kernel/notifier.c:85
call_netdevice_notifiers_extack net/core/dev.c:2292 [inline]
call_netdevice_notifiers net/core/dev.c:2306 [inline]
__dev_change_net_namespace+0xcbb/0x1de0 net/core/dev.c:12776
do_setlink+0x2d1/0x4670 net/core/rtnetlink.c:3148
rtnl_changelink net/core/rtnetlink.c:3885 [inline]
__rtnl_newlink net/core/rtnetlink.c:4056 [inline]
rtnl_newlink+0x15a3/0x1c30 net/core/rtnetlink.c:4195
rtnetlink_rcv_msg+0x802/0xc00 net/core/rtnetlink.c:7112
netlink_rcv_skb+0x226/0x4a0 net/netlink/af_netlink.c:2556
netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline]
netlink_unicast+0x7f5/0x990 net/netlink/af_netlink.c:1345
netlink_sendmsg+0x813/0xb40 net/netlink/af_netlink.c:1900
sock_sendmsg_nosec+0x13a/0x180 net/socket.c:810
Call trace for netdevsim3[49] -1 at
__dev_put include/linux/netdevice.h:4509 [inline]
netdev_put include/linux/netdevice.h:4576 [inline]
neigh_parms_release+0x1b0/0x240 net/core/neighbour.c:1812
inetdev_destroy net/ipv4/devinet.c:335 [inline]
inetdev_event+0x7d6/0x15e0 net/ipv4/devinet.c:1655
notifier_call_chain+0x1a5/0x3d0 kernel/notifier.c:85
call_netdevice_notifiers_extack net/core/dev.c:2292 [inline]
call_netdevice_notifiers net/core/dev.c:2306 [inline]
__dev_change_net_namespace+0xcbb/0x1de0 net/core/dev.c:12776
do_setlink+0x2d1/0x4670 net/core/rtnetlink.c:3148
rtnl_changelink net/core/rtnetlink.c:3885 [inline]
__rtnl_newlink net/core/rtnetlink.c:4056 [inline]
rtnl_newlink+0x15a3/0x1c30 net/core/rtnetlink.c:4195
rtnetlink_rcv_msg+0x802/0xc00 net/core/rtnetlink.c:7112
netlink_rcv_skb+0x226/0x4a0 net/netlink/af_netlink.c:2556
netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline]
netlink_unicast+0x7f5/0x990 net/netlink/af_netlink.c:1345
netlink_sendmsg+0x813/0xb40 net/netlink/af_netlink.c:1900
sock_sendmsg_nosec+0x13a/0x180 net/socket.c:810
Call trace for netdevsim3[50] -1 at
__dev_put include/linux/netdevice.h:4509 [inline]
netdev_put include/linux/netdevice.h:4576 [inline]
in_dev_finish_destroy+0xa7/0x1a0 net/ipv4/devinet.c:258
in_dev_put include/linux/inetdevice.h:290 [inline]
inetdev_destroy net/ipv4/devinet.c:338 [inline]
inetdev_event+0x81d/0x15e0 net/ipv4/devinet.c:1655
notifier_call_chain+0x1a5/0x3d0 kernel/notifier.c:85
call_netdevice_notifiers_extack net/core/dev.c:2292 [inline]
call_netdevice_notifiers net/core/dev.c:2306 [inline]
__dev_change_net_namespace+0xcbb/0x1de0 net/core/dev.c:12776
do_setlink+0x2d1/0x4670 net/core/rtnetlink.c:3148
rtnl_changelink net/core/rtnetlink.c:3885 [inline]
__rtnl_newlink net/core/rtnetlink.c:4056 [inline]
rtnl_newlink+0x15a3/0x1c30 net/core/rtnetlink.c:4195
rtnetlink_rcv_msg+0x802/0xc00 net/core/rtnetlink.c:7112
netlink_rcv_skb+0x226/0x4a0 net/netlink/af_netlink.c:2556
netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline]
netlink_unicast+0x7f5/0x990 net/netlink/af_netlink.c:1345
netlink_sendmsg+0x813/0xb40 net/netlink/af_netlink.c:1900
sock_sendmsg_nosec+0x13a/0x180 net/socket.c:810
Call trace for netdevsim3[51] -1 at
__dev_put include/linux/netdevice.h:4509 [inline]
netdev_put include/linux/netdevice.h:4576 [inline]
neigh_parms_release+0x1b0/0x240 net/core/neighbour.c:1812
addrconf_ifdown+0x173a/0x1a00 net/ipv6/addrconf.c:4042
addrconf_notify+0x1bc/0x1050 net/ipv6/addrconf.c:-1
notifier_call_chain+0x1a5/0x3d0 kernel/notifier.c:85
call_netdevice_notifiers_extack net/core/dev.c:2292 [inline]
call_netdevice_notifiers net/core/dev.c:2306 [inline]
__dev_change_net_namespace+0xcbb/0x1de0 net/core/dev.c:12776
do_setlink+0x2d1/0x4670 net/core/rtnetlink.c:3148
rtnl_changelink net/core/rtnetlink.c:3885 [inline]
__rtnl_newlink net/core/rtnetlink.c:4056 [inline]
rtnl_newlink+0x15a3/0x1c30 net/core/rtnetlink.c:4195
rtnetlink_rcv_msg+0x802/0xc00 net/core/rtnetlink.c:7112
netlink_rcv_skb+0x226/0x4a0 net/netlink/af_netlink.c:2556
netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline]
netlink_unicast+0x7f5/0x990 net/netlink/af_netlink.c:1345
netlink_sendmsg+0x813/0xb40 net/netlink/af_netlink.c:1900
sock_sendmsg_nosec+0x13a/0x180 net/socket.c:810
Call trace for netdevsim3[52] -1 at
__dev_put include/linux/netdevice.h:4509 [inline]
netdev_put include/linux/netdevice.h:4576 [inline]
in6_dev_finish_destroy+0xdd/0x1e0 net/ipv6/addrconf_core.c:176
in6_dev_put include/net/addrconf.h:426 [inline]
addrconf_ifdown+0x178c/0x1a00 net/ipv6/addrconf.c:4044
addrconf_notify+0x1bc/0x1050 net/ipv6/addrconf.c:-1
notifier_call_chain+0x1a5/0x3d0 kernel/notifier.c:85
call_netdevice_notifiers_extack net/core/dev.c:2292 [inline]
call_netdevice_notifiers net/core/dev.c:2306 [inline]
__dev_change_net_namespace+0xcbb/0x1de0 net/core/dev.c:12776
do_setlink+0x2d1/0x4670 net/core/rtnetlink.c:3148
rtnl_changelink net/core/rtnetlink.c:3885 [inline]
__rtnl_newlink net/core/rtnetlink.c:4056 [inline]
rtnl_newlink+0x15a3/0x1c30 net/core/rtnetlink.c:4195
rtnetlink_rcv_msg+0x802/0xc00 net/core/rtnetlink.c:7112
netlink_rcv_skb+0x226/0x4a0 net/netlink/af_netlink.c:2556
netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline]
netlink_unicast+0x7f5/0x990 net/netlink/af_netlink.c:1345
netlink_sendmsg+0x813/0xb40 net/netlink/af_netlink.c:1900
sock_sendmsg_nosec+0x13a/0x180 net/socket.c:810
Call trace for netdevsim3[53] +3 at
__dev_hold include/linux/netdevice.h:4523 [inline]
netdev_hold include/linux/netdevice.h:4566 [inline]
dev_hold include/linux/netdevice.h:4589 [inline]
netdevice_queue_work drivers/infiniband/core/roce_gid_mgmt.c:674 [inline]
netdevice_event+0x4e1/0x8c0 drivers/infiniband/core/roce_gid_mgmt.c:822
notifier_call_chain+0x1a5/0x3d0 kernel/notifier.c:85
call_netdevice_notifiers_extack net/core/dev.c:2292 [inline]
call_netdevice_notifiers net/core/dev.c:2306 [inline]
__dev_change_net_namespace+0x18af/0x1de0 net/core/dev.c:12838
do_setlink+0x2d1/0x4670 net/core/rtnetlink.c:3148
rtnl_changelink net/core/rtnetlink.c:3885 [inline]
__rtnl_newlink net/core/rtnetlink.c:4056 [inline]
rtnl_newlink+0x15a3/0x1c30 net/core/rtnetlink.c:4195
rtnetlink_rcv_msg+0x802/0xc00 net/core/rtnetlink.c:7112
netlink_rcv_skb+0x226/0x4a0 net/netlink/af_netlink.c:2556
netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline]
netlink_unicast+0x7f5/0x990 net/netlink/af_netlink.c:1345
netlink_sendmsg+0x813/0xb40 net/netlink/af_netlink.c:1900
sock_sendmsg_nosec+0x13a/0x180 net/socket.c:810
Call trace for netdevsim3[54] +3 at
__dev_hold include/linux/netdevice.h:4523 [inline]
netdev_hold include/linux/netdevice.h:4566 [inline]
dev_hold include/linux/netdevice.h:4589 [inline]
netdevice_queue_work drivers/infiniband/core/roce_gid_mgmt.c:675 [inline]
netdevice_event+0x592/0x8c0 drivers/infiniband/core/roce_gid_mgmt.c:822
notifier_call_chain+0x1a5/0x3d0 kernel/notifier.c:85
call_netdevice_notifiers_extack net/core/dev.c:2292 [inline]
call_netdevice_notifiers net/core/dev.c:2306 [inline]
__dev_change_net_namespace+0x18af/0x1de0 net/core/dev.c:12838
do_setlink+0x2d1/0x4670 net/core/rtnetlink.c:3148
rtnl_changelink net/core/rtnetlink.c:3885 [inline]
__rtnl_newlink net/core/rtnetlink.c:4056 [inline]
rtnl_newlink+0x15a3/0x1c30 net/core/rtnetlink.c:4195
rtnetlink_rcv_msg+0x802/0xc00 net/core/rtnetlink.c:7112
netlink_rcv_skb+0x226/0x4a0 net/netlink/af_netlink.c:2556
netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline]
netlink_unicast+0x7f5/0x990 net/netlink/af_netlink.c:1345
netlink_sendmsg+0x813/0xb40 net/netlink/af_netlink.c:1900
sock_sendmsg_nosec+0x13a/0x180 net/socket.c:810
Call trace for netdevsim3[55] +1 at
__dev_hold include/linux/netdevice.h:4523 [inline]
netdev_hold include/linux/netdevice.h:4566 [inline]
neigh_parms_alloc+0x192/0x540 net/core/neighbour.c:1773
inetdev_init+0x117/0x4e0 net/ipv4/devinet.c:280
inetdev_event+0x307/0x15e0 net/ipv4/devinet.c:1590
notifier_call_chain+0x1a5/0x3d0 kernel/notifier.c:85
call_netdevice_notifiers_extack net/core/dev.c:2292 [inline]
call_netdevice_notifiers net/core/dev.c:2306 [inline]
__dev_change_net_namespace+0x18af/0x1de0 net/core/dev.c:12838
do_setlink+0x2d1/0x4670 net/core/rtnetlink.c:3148
rtnl_changelink net/core/rtnetlink.c:3885 [inline]
__rtnl_newlink net/core/rtnetlink.c:4056 [inline]
rtnl_newlink+0x15a3/0x1c30 net/core/rtnetlink.c:4195
rtnetlink_rcv_msg+0x802/0xc00 net/core/rtnetlink.c:7112
netlink_rcv_skb+0x226/0x4a0 net/netlink/af_netlink.c:2556
netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline]
netlink_unicast+0x7f5/0x990 net/netlink/af_netlink.c:1345
netlink_sendmsg+0x813/0xb40 net/netlink/af_netlink.c:1900
sock_sendmsg_nosec+0x13a/0x180 net/socket.c:810
Call trace for netdevsim3[56] +1 at
__dev_hold include/linux/netdevice.h:4523 [inline]
netdev_hold include/linux/netdevice.h:4566 [inline]
inetdev_init+0x19a/0x4e0 net/ipv4/devinet.c:286
inetdev_event+0x307/0x15e0 net/ipv4/devinet.c:1590
notifier_call_chain+0x1a5/0x3d0 kernel/notifier.c:85
call_netdevice_notifiers_extack net/core/dev.c:2292 [inline]
call_netdevice_notifiers net/core/dev.c:2306 [inline]
__dev_change_net_namespace+0x18af/0x1de0 net/core/dev.c:12838
do_setlink+0x2d1/0x4670 net/core/rtnetlink.c:3148
rtnl_changelink net/core/rtnetlink.c:3885 [inline]
__rtnl_newlink net/core/rtnetlink.c:4056 [inline]
rtnl_newlink+0x15a3/0x1c30 net/core/rtnetlink.c:4195
rtnetlink_rcv_msg+0x802/0xc00 net/core/rtnetlink.c:7112
netlink_rcv_skb+0x226/0x4a0 net/netlink/af_netlink.c:2556
netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline]
netlink_unicast+0x7f5/0x990 net/netlink/af_netlink.c:1345
netlink_sendmsg+0x813/0xb40 net/netlink/af_netlink.c:1900
sock_sendmsg_nosec+0x13a/0x180 net/socket.c:810
Call trace for netdevsim3[57] +1 at
__dev_hold include/linux/netdevice.h:4523 [inline]
netdev_hold include/linux/netdevice.h:4566 [inline]
neigh_parms_alloc+0x192/0x540 net/core/neighbour.c:1773
ipv6_add_dev+0x44b/0x1420 net/ipv6/addrconf.c:403
addrconf_notify+0x771/0x1050 net/ipv6/addrconf.c:3685
notifier_call_chain+0x1a5/0x3d0 kernel/notifier.c:85
call_netdevice_notifiers_extack net/core/dev.c:2292 [inline]
call_netdevice_notifiers net/core/dev.c:2306 [inline]
__dev_change_net_namespace+0x18af/0x1de0 net/core/dev.c:12838
do_setlink+0x2d1/0x4670 net/core/rtnetlink.c:3148
rtnl_changelink net/core/rtnetlink.c:3885 [inline]
__rtnl_newlink net/core/rtnetlink.c:4056 [inline]
rtnl_newlink+0x15a3/0x1c30 net/core/rtnetlink.c:4195
rtnetlink_rcv_msg+0x802/0xc00 net/core/rtnetlink.c:7112
netlink_rcv_skb+0x226/0x4a0 net/netlink/af_netlink.c:2556
netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline]
netlink_unicast+0x7f5/0x990 net/netlink/af_netlink.c:1345
netlink_sendmsg+0x813/0xb40 net/netlink/af_netlink.c:1900
sock_sendmsg_nosec+0x13a/0x180 net/socket.c:810
Call trace for netdevsim3[58] +1 at
__dev_hold include/linux/netdevice.h:4523 [inline]
netdev_hold include/linux/netdevice.h:4566 [inline]
ipv6_add_dev+0x4ec/0x1420 net/ipv6/addrconf.c:411
addrconf_notify+0x771/0x1050 net/ipv6/addrconf.c:3685
notifier_call_chain+0x1a5/0x3d0 kernel/notifier.c:85
call_netdevice_notifiers_extack net/core/dev.c:2292 [inline]
call_netdevice_notifiers net/core/dev.c:2306 [inline]
__dev_change_net_namespace+0x18af/0x1de0 net/core/dev.c:12838
do_setlink+0x2d1/0x4670 net/core/rtnetlink.c:3148
rtnl_changelink net/core/rtnetlink.c:3885 [inline]
__rtnl_newlink net/core/rtnetlink.c:4056 [inline]
rtnl_newlink+0x15a3/0x1c30 net/core/rtnetlink.c:4195
rtnetlink_rcv_msg+0x802/0xc00 net/core/rtnetlink.c:7112
netlink_rcv_skb+0x226/0x4a0 net/netlink/af_netlink.c:2556
netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline]
netlink_unicast+0x7f5/0x990 net/netlink/af_netlink.c:1345
netlink_sendmsg+0x813/0xb40 net/netlink/af_netlink.c:1900
sock_sendmsg_nosec+0x13a/0x180 net/socket.c:810
Call trace for netdevsim3[59] +1 at
__dev_hold include/linux/netdevice.h:4523 [inline]
netdev_hold include/linux/netdevice.h:4566 [inline]
dev_hold include/linux/netdevice.h:4589 [inline]
udp_tunnel_nic_register net/ipv4/udp_tunnel_nic.c:850 [inline]
udp_tunnel_nic_netdevice_event+0xb21/0x1870 net/ipv4/udp_tunnel_nic.c:931
notifier_call_chain+0x1a5/0x3d0 kernel/notifier.c:85
call_netdevice_notifiers_extack net/core/dev.c:2292 [inline]
call_netdevice_notifiers net/core/dev.c:2306 [inline]
__dev_change_net_namespace+0x18af/0x1de0 net/core/dev.c:12838
do_setlink+0x2d1/0x4670 net/core/rtnetlink.c:3148
rtnl_changelink net/core/rtnetlink.c:3885 [inline]
__rtnl_newlink net/core/rtnetlink.c:4056 [inline]
rtnl_newlink+0x15a3/0x1c30 net/core/rtnetlink.c:4195
rtnetlink_rcv_msg+0x802/0xc00 net/core/rtnetlink.c:7112
netlink_rcv_skb+0x226/0x4a0 net/netlink/af_netlink.c:2556
netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline]
netlink_unicast+0x7f5/0x990 net/netlink/af_netlink.c:1345
netlink_sendmsg+0x813/0xb40 net/netlink/af_netlink.c:1900
sock_sendmsg_nosec+0x13a/0x180 net/socket.c:810
Call trace for netdevsim3[60] -1 at
__dev_put include/linux/netdevice.h:4509 [inline]
__linkwatch_run_queue+0x608/0x810 net/core/link_watch.c:246
linkwatch_event+0x4c/0x60 net/core/link_watch.c:314
process_one_work+0xaaf/0x1480 kernel/workqueue.c:3379
Call trace for netdevsim3[61] +1 at
__dev_hold include/linux/netdevice.h:4523 [inline]
netdev_hold include/linux/netdevice.h:4566 [inline]
dev_hold include/linux/netdevice.h:4589 [inline]
aoecmd_cfg_pkts drivers/block/aoe/aoecmd.c:424 [inline]
aoecmd_cfg+0x217/0x840 drivers/block/aoe/aoecmd.c:1374
call_timer_fn+0x192/0x5e0 kernel/time/timer.c:1748
expire_timers kernel/time/timer.c:1799 [inline]
__run_timers kernel/time/timer.c:2374 [inline]
__run_timer_base+0x67b/0x9b0 kernel/time/timer.c:2386
run_timer_base kernel/time/timer.c:2395 [inline]
run_timer_softirq+0xb7/0x170 kernel/time/timer.c:2405
handle_softirqs+0x1d9/0x6c0 kernel/softirq.c:626
Call trace for netdevsim3[62] -1 at
__dev_put include/linux/netdevice.h:4509 [inline]
netdev_put include/linux/netdevice.h:4576 [inline]
dev_put include/linux/netdevice.h:4601 [inline]
tx+0xc6/0x190 drivers/block/aoe/aoenet.c:66
kthread+0x1ed/0x420 drivers/block/aoe/aoecmd.c:1241
kthread+0x388/0x470 kernel/kthread.c:436
ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
Call trace for netdevsim3[63] +1 at
__dev_hold include/linux/netdevice.h:4523 [inline]
netdev_hold include/linux/netdevice.h:4566 [inline]
dev_hold include/linux/netdevice.h:4589 [inline]
netdevice_queue_work drivers/infiniband/core/roce_gid_mgmt.c:674 [inline]
netdevice_event+0x4e1/0x8c0 drivers/infiniband/core/roce_gid_mgmt.c:822
notifier_call_chain+0x1a5/0x3d0 kernel/notifier.c:85
call_netdevice_notifiers_extack net/core/dev.c:2292 [inline]
call_netdevice_notifiers net/core/dev.c:2306 [inline]
unregister_netdevice_many_notify+0x17de/0x2120 net/core/dev.c:12482
unregister_netdevice_many net/core/dev.c:12553 [inline]
unregister_netdevice_queue+0x2f5/0x340 net/core/dev.c:12355
unregister_netdevice include/linux/netdevice.h:3483 [inline]
nsim_destroy+0x275/0x800 drivers/net/netdevsim/netdev.c:1196
__nsim_dev_port_del+0x14e/0x200 drivers/net/netdevsim/dev.c:1547
nsim_dev_port_del_all drivers/net/netdevsim/dev.c:1561 [inline]
nsim_dev_reload_destroy+0x288/0x490 drivers/net/netdevsim/dev.c:1785
nsim_dev_reload_down+0x8a/0xc0 drivers/net/netdevsim/dev.c:1038
devlink_reload+0x1c5/0x890 net/devlink/dev.c:462
devlink_pernet_pre_exit+0x1ff/0x420 net/devlink/core.c:578
ops_pre_exit_list net/core/net_namespace.c:161 [inline]
ops_undo_list+0x17d/0x8d0 net/core/net_namespace.c:235
cleanup_net+0x575/0x810 net/core/net_namespace.c:706
process_one_work+0xaaf/0x1480 kernel/workqueue.c:3379
Call trace for netdevsim3[64] +1 at
__dev_hold include/linux/netdevice.h:4523 [inline]
netdev_hold include/linux/netdevice.h:4566 [inline]
dev_hold include/linux/netdevice.h:4589 [inline]
netdevice_queue_work drivers/infiniband/core/roce_gid_mgmt.c:675 [inline]
netdevice_event+0x592/0x8c0 drivers/infiniband/core/roce_gid_mgmt.c:822
notifier_call_chain+0x1a5/0x3d0 kernel/notifier.c:85
call_netdevice_notifiers_extack net/core/dev.c:2292 [inline]
call_netdevice_notifiers net/core/dev.c:2306 [inline]
unregister_netdevice_many_notify+0x17de/0x2120 net/core/dev.c:12482
unregister_netdevice_many net/core/dev.c:12553 [inline]
unregister_netdevice_queue+0x2f5/0x340 net/core/dev.c:12355
unregister_netdevice include/linux/netdevice.h:3483 [inline]
nsim_destroy+0x275/0x800 drivers/net/netdevsim/netdev.c:1196
__nsim_dev_port_del+0x14e/0x200 drivers/net/netdevsim/dev.c:1547
nsim_dev_port_del_all drivers/net/netdevsim/dev.c:1561 [inline]
nsim_dev_reload_destroy+0x288/0x490 drivers/net/netdevsim/dev.c:1785
nsim_dev_reload_down+0x8a/0xc0 drivers/net/netdevsim/dev.c:1038
devlink_reload+0x1c5/0x890 net/devlink/dev.c:462
devlink_pernet_pre_exit+0x1ff/0x420 net/devlink/core.c:578
ops_pre_exit_list net/core/net_namespace.c:161 [inline]
ops_undo_list+0x17d/0x8d0 net/core/net_namespace.c:235
cleanup_net+0x575/0x810 net/core/net_namespace.c:706
process_one_work+0xaaf/0x1480 kernel/workqueue.c:3379
Call trace for netdevsim3[65] -1 at
__dev_put include/linux/netdevice.h:4509 [inline]
netdev_put include/linux/netdevice.h:4576 [inline]
neigh_parms_release+0x1b0/0x240 net/core/neighbour.c:1812
inetdev_destroy net/ipv4/devinet.c:335 [inline]
inetdev_event+0x7d6/0x15e0 net/ipv4/devinet.c:1655
notifier_call_chain+0x1a5/0x3d0 kernel/notifier.c:85
call_netdevice_notifiers_extack net/core/dev.c:2292 [inline]
call_netdevice_notifiers net/core/dev.c:2306 [inline]
unregister_netdevice_many_notify+0x17de/0x2120 net/core/dev.c:12482
unregister_netdevice_many net/core/dev.c:12553 [inline]
unregister_netdevice_queue+0x2f5/0x340 net/core/dev.c:12355
unregister_netdevice include/linux/netdevice.h:3483 [inline]
nsim_destroy+0x275/0x800 drivers/net/netdevsim/netdev.c:1196
__nsim_dev_port_del+0x14e/0x200 drivers/net/netdevsim/dev.c:1547
nsim_dev_port_del_all drivers/net/netdevsim/dev.c:1561 [inline]
nsim_dev_reload_destroy+0x288/0x490 drivers/net/netdevsim/dev.c:1785
nsim_dev_reload_down+0x8a/0xc0 drivers/net/netdevsim/dev.c:1038
devlink_reload+0x1c5/0x890 net/devlink/dev.c:462
devlink_pernet_pre_exit+0x1ff/0x420 net/devlink/core.c:578
ops_pre_exit_list net/core/net_namespace.c:161 [inline]
ops_undo_list+0x17d/0x8d0 net/core/net_namespace.c:235
cleanup_net+0x575/0x810 net/core/net_namespace.c:706
process_one_work+0xaaf/0x1480 kernel/workqueue.c:3379
Call trace for netdevsim3[66] -1 at
__dev_put include/linux/netdevice.h:4509 [inline]
netdev_put include/linux/netdevice.h:4576 [inline]
in_dev_finish_destroy+0xa7/0x1a0 net/ipv4/devinet.c:258
in_dev_put include/linux/inetdevice.h:290 [inline]
inetdev_destroy net/ipv4/devinet.c:338 [inline]
inetdev_event+0x81d/0x15e0 net/ipv4/devinet.c:1655
notifier_call_chain+0x1a5/0x3d0 kernel/notifier.c:85
call_netdevice_notifiers_extack net/core/dev.c:2292 [inline]
call_netdevice_notifiers net/core/dev.c:2306 [inline]
unregister_netdevice_many_notify+0x17de/0x2120 net/core/dev.c:12482
unregister_netdevice_many net/core/dev.c:12553 [inline]
unregister_netdevice_queue+0x2f5/0x340 net/core/dev.c:12355
unregister_netdevice include/linux/netdevice.h:3483 [inline]
nsim_destroy+0x275/0x800 drivers/net/netdevsim/netdev.c:1196
__nsim_dev_port_del+0x14e/0x200 drivers/net/netdevsim/dev.c:1547
nsim_dev_port_del_all drivers/net/netdevsim/dev.c:1561 [inline]
nsim_dev_reload_destroy+0x288/0x490 drivers/net/netdevsim/dev.c:1785
nsim_dev_reload_down+0x8a/0xc0 drivers/net/netdevsim/dev.c:1038
devlink_reload+0x1c5/0x890 net/devlink/dev.c:462
devlink_pernet_pre_exit+0x1ff/0x420 net/devlink/core.c:578
ops_pre_exit_list net/core/net_namespace.c:161 [inline]
ops_undo_list+0x17d/0x8d0 net/core/net_namespace.c:235
cleanup_net+0x575/0x810 net/core/net_namespace.c:706
process_one_work+0xaaf/0x1480 kernel/workqueue.c:3379
Call trace for netdevsim3[67] -1 at
__dev_put include/linux/netdevice.h:4509 [inline]
netdev_put include/linux/netdevice.h:4576 [inline]
neigh_parms_release+0x1b0/0x240 net/core/neighbour.c:1812
addrconf_ifdown+0x173a/0x1a00 net/ipv6/addrconf.c:4042
addrconf_notify+0x1bc/0x1050 net/ipv6/addrconf.c:-1
notifier_call_chain+0x1a5/0x3d0 kernel/notifier.c:85
call_netdevice_notifiers_extack net/core/dev.c:2292 [inline]
call_netdevice_notifiers net/core/dev.c:2306 [inline]
unregister_netdevice_many_notify+0x17de/0x2120 net/core/dev.c:12482
unregister_netdevice_many net/core/dev.c:12553 [inline]
unregister_netdevice_queue+0x2f5/0x340 net/core/dev.c:12355
unregister_netdevice include/linux/netdevice.h:3483 [inline]
nsim_destroy+0x275/0x800 drivers/net/netdevsim/netdev.c:1196
__nsim_dev_port_del+0x14e/0x200 drivers/net/netdevsim/dev.c:1547
nsim_dev_port_del_all drivers/net/netdevsim/dev.c:1561 [inline]
nsim_dev_reload_destroy+0x288/0x490 drivers/net/netdevsim/dev.c:1785
nsim_dev_reload_down+0x8a/0xc0 drivers/net/netdevsim/dev.c:1038
devlink_reload+0x1c5/0x890 net/devlink/dev.c:462
devlink_pernet_pre_exit+0x1ff/0x420 net/devlink/core.c:578
ops_pre_exit_list net/core/net_namespace.c:161 [inline]
ops_undo_list+0x17d/0x8d0 net/core/net_namespace.c:235
cleanup_net+0x575/0x810 net/core/net_namespace.c:706
process_one_work+0xaaf/0x1480 kernel/workqueue.c:3379
Call trace for netdevsim3[68] -1 at
__dev_put include/linux/netdevice.h:4509 [inline]
netdev_put include/linux/netdevice.h:4576 [inline]
in6_dev_finish_destroy+0xdd/0x1e0 net/ipv6/addrconf_core.c:176
in6_dev_put include/net/addrconf.h:426 [inline]
addrconf_ifdown+0x178c/0x1a00 net/ipv6/addrconf.c:4044
addrconf_notify+0x1bc/0x1050 net/ipv6/addrconf.c:-1
notifier_call_chain+0x1a5/0x3d0 kernel/notifier.c:85
call_netdevice_notifiers_extack net/core/dev.c:2292 [inline]
call_netdevice_notifiers net/core/dev.c:2306 [inline]
unregister_netdevice_many_notify+0x17de/0x2120 net/core/dev.c:12482
unregister_netdevice_many net/core/dev.c:12553 [inline]
unregister_netdevice_queue+0x2f5/0x340 net/core/dev.c:12355
unregister_netdevice include/linux/netdevice.h:3483 [inline]
nsim_destroy+0x275/0x800 drivers/net/netdevsim/netdev.c:1196
__nsim_dev_port_del+0x14e/0x200 drivers/net/netdevsim/dev.c:1547
nsim_dev_port_del_all drivers/net/netdevsim/dev.c:1561 [inline]
nsim_dev_reload_destroy+0x288/0x490 drivers/net/netdevsim/dev.c:1785
nsim_dev_reload_down+0x8a/0xc0 drivers/net/netdevsim/dev.c:1038
devlink_reload+0x1c5/0x890 net/devlink/dev.c:462
devlink_pernet_pre_exit+0x1ff/0x420 net/devlink/core.c:578
ops_pre_exit_list net/core/net_namespace.c:161 [inline]
ops_undo_list+0x17d/0x8d0 net/core/net_namespace.c:235
cleanup_net+0x575/0x810 net/core/net_namespace.c:706
process_one_work+0xaaf/0x1480 kernel/workqueue.c:3379
Call trace for netdevsim3[69] -1 at
__dev_put include/linux/netdevice.h:4509 [inline]
netdev_put include/linux/netdevice.h:4576 [inline]
dev_put include/linux/netdevice.h:4601 [inline]
udp_tunnel_nic_unregister net/ipv4/udp_tunnel_nic.c:913 [inline]
udp_tunnel_nic_netdevice_event+0x1601/0x1870 net/ipv4/udp_tunnel_nic.c:942
notifier_call_chain+0x1a5/0x3d0 kernel/notifier.c:85
call_netdevice_notifiers_extack net/core/dev.c:2292 [inline]
call_netdevice_notifiers net/core/dev.c:2306 [inline]
unregister_netdevice_many_notify+0x17de/0x2120 net/core/dev.c:12482
unregister_netdevice_many net/core/dev.c:12553 [inline]
unregister_netdevice_queue+0x2f5/0x340 net/core/dev.c:12355
unregister_netdevice include/linux/netdevice.h:3483 [inline]
nsim_destroy+0x275/0x800 drivers/net/netdevsim/netdev.c:1196
__nsim_dev_port_del+0x14e/0x200 drivers/net/netdevsim/dev.c:1547
nsim_dev_port_del_all drivers/net/netdevsim/dev.c:1561 [inline]
nsim_dev_reload_destroy+0x288/0x490 drivers/net/netdevsim/dev.c:1785
nsim_dev_reload_down+0x8a/0xc0 drivers/net/netdevsim/dev.c:1038
devlink_reload+0x1c5/0x890 net/devlink/dev.c:462
devlink_pernet_pre_exit+0x1ff/0x420 net/devlink/core.c:578
ops_pre_exit_list net/core/net_namespace.c:161 [inline]
ops_undo_list+0x17d/0x8d0 net/core/net_namespace.c:235
cleanup_net+0x575/0x810 net/core/net_namespace.c:706
process_one_work+0xaaf/0x1480 kernel/workqueue.c:3379
Call trace for netdevsim3[70] -1 at
__dev_put include/linux/netdevice.h:4509 [inline]
netdev_put include/linux/netdevice.h:4576 [inline]
rx_queue_release+0x11d/0x190 net/core/net-sysfs.c:1160
kobject_cleanup lib/kobject.c:689 [inline]
kobject_release lib/kobject.c:720 [inline]
kref_put include/linux/kref.h:65 [inline]
kobject_put+0x222/0x550 lib/kobject.c:737
net_rx_queue_update_kobjects+0x6d0/0x790 net/core/net-sysfs.c:1317
remove_queue_kobjects net/core/net-sysfs.c:2148 [inline]
netdev_unregister_kobject+0xff/0x450 net/core/net-sysfs.c:2304
unregister_netdevice_many_notify+0x1bb1/0x2120 net/core/dev.c:12515
unregister_netdevice_many net/core/dev.c:12553 [inline]
unregister_netdevice_queue+0x2f5/0x340 net/core/dev.c:12355
unregister_netdevice include/linux/netdevice.h:3483 [inline]
nsim_destroy+0x275/0x800 drivers/net/netdevsim/netdev.c:1196
__nsim_dev_port_del+0x14e/0x200 drivers/net/netdevsim/dev.c:1547
nsim_dev_port_del_all drivers/net/netdevsim/dev.c:1561 [inline]
nsim_dev_reload_destroy+0x288/0x490 drivers/net/netdevsim/dev.c:1785
nsim_dev_reload_down+0x8a/0xc0 drivers/net/netdevsim/dev.c:1038
devlink_reload+0x1c5/0x890 net/devlink/dev.c:462
devlink_pernet_pre_exit+0x1ff/0x420 net/devlink/core.c:578
ops_pre_exit_list net/core/net_namespace.c:161 [inline]
ops_undo_list+0x17d/0x8d0 net/core/net_namespace.c:235
cleanup_net+0x575/0x810 net/core/net_namespace.c:706
process_one_work+0xaaf/0x1480 kernel/workqueue.c:3379
Call trace for netdevsim3[71] -1 at
__dev_put include/linux/netdevice.h:4509 [inline]
netdev_put include/linux/netdevice.h:4576 [inline]
netdev_queue_release+0x6a/0xd0 net/core/net-sysfs.c:1910
kobject_cleanup lib/kobject.c:689 [inline]
kobject_release lib/kobject.c:720 [inline]
kref_put include/linux/kref.h:65 [inline]
kobject_put+0x222/0x550 lib/kobject.c:737
netdev_queue_update_kobjects+0x5d1/0x6b0 net/core/net-sysfs.c:2052
remove_queue_kobjects net/core/net-sysfs.c:2149 [inline]
netdev_unregister_kobject+0x10b/0x450 net/core/net-sysfs.c:2304
unregister_netdevice_many_notify+0x1bb1/0x2120 net/core/dev.c:12515
unregister_netdevice_many net/core/dev.c:12553 [inline]
unregister_netdevice_queue+0x2f5/0x340 net/core/dev.c:12355
unregister_netdevice include/linux/netdevice.h:3483 [inline]
nsim_destroy+0x275/0x800 drivers/net/netdevsim/netdev.c:1196
__nsim_dev_port_del+0x14e/0x200 drivers/net/netdevsim/dev.c:1547
nsim_dev_port_del_all drivers/net/netdevsim/dev.c:1561 [inline]
nsim_dev_reload_destroy+0x288/0x490 drivers/net/netdevsim/dev.c:1785
nsim_dev_reload_down+0x8a/0xc0 drivers/net/netdevsim/dev.c:1038
devlink_reload+0x1c5/0x890 net/devlink/dev.c:462
devlink_pernet_pre_exit+0x1ff/0x420 net/devlink/core.c:578
ops_pre_exit_list net/core/net_namespace.c:161 [inline]
ops_undo_list+0x17d/0x8d0 net/core/net_namespace.c:235
cleanup_net+0x575/0x810 net/core/net_namespace.c:706
process_one_work+0xaaf/0x1480 kernel/workqueue.c:3379
Call trace for netdevsim3[72] -1 at
__dev_put include/linux/netdevice.h:4509 [inline]
netdev_put include/linux/netdevice.h:4576 [inline]
unregister_netdevice_many_notify+0x1df8/0x2120 net/core/dev.c:12535
unregister_netdevice_many net/core/dev.c:12553 [inline]
unregister_netdevice_queue+0x2f5/0x340 net/core/dev.c:12355
unregister_netdevice include/linux/netdevice.h:3483 [inline]
nsim_destroy+0x275/0x800 drivers/net/netdevsim/netdev.c:1196
__nsim_dev_port_del+0x14e/0x200 drivers/net/netdevsim/dev.c:1547
nsim_dev_port_del_all drivers/net/netdevsim/dev.c:1561 [inline]
nsim_dev_reload_destroy+0x288/0x490 drivers/net/netdevsim/dev.c:1785
nsim_dev_reload_down+0x8a/0xc0 drivers/net/netdevsim/dev.c:1038
devlink_reload+0x1c5/0x890 net/devlink/dev.c:462
devlink_pernet_pre_exit+0x1ff/0x420 net/devlink/core.c:578
ops_pre_exit_list net/core/net_namespace.c:161 [inline]
ops_undo_list+0x17d/0x8d0 net/core/net_namespace.c:235
cleanup_net+0x575/0x810 net/core/net_namespace.c:706
process_one_work+0xaaf/0x1480 kernel/workqueue.c:3379
balance as of netdevsim3[72] is 1
^ permalink raw reply
* Re: [PATCH net] ieee802154: hwsim: free PIB after unregistering hardware
From: Yousef Alhouseen @ 2026-07-18 12:20 UTC (permalink / raw)
To: miquel.raynal
Cc: alex.aring, stefan, andrew+netdev, davem, edumazet, kuba, pabeni,
linux-wpan, netdev, linux-kernel, stable,
syzbot+4707bb8a43a42fca2b97
In-Reply-To: <87jyr8jgr8.fsf@bootlin.com>
Agreed. I'll use rcu_access_pointer() in v2; it expresses the final
pointer fetch more directly once unregister has quiesced the updaters.
Thanks,
Yousef
On Mon, 06 Jul 2026 17:10:35 +0200, Miquel Raynal
<miquel.raynal@bootlin.com> wrote:
> Hello Yousef,
>
> On 03/07/2026 at 04:19:42 -07, Yousef Alhouseen <alhouseenyousef@gmail.com> wrote:
>
> > Hello Miquel,
> >
> > After ieee802154_unregister_hw() returns, the driver callbacks that
> > can replace phy->pib have been quiesced, and hwsim_del() has exclusive
> > ownership of the final teardown. The pointer is no longer being
> > fetched inside an RCU read-side critical section, so rcu_dereference()
> > is not appropriate there.
>
> That's right.
>
> > rcu_dereference_protected(phy->pib, 1) expresses that there can no
> > longer be a concurrent updater at that point; the protection condition
> > is the completed unregister rather than a locally held lock. The value
> > is only fetched so the final object can be passed to kfree_rcu().
>
> While I believe this is indeed true, it actually feels slightly overkill
> since there is no updater anymore and, as far as I understand, the only
> thing that we need here is to get the pointer value for freeing, right?
>
> > rcu_access_pointer() would also be sufficient for that limited use if
> > you prefer it, and I can use that spelling in a v2.
>
> If you don't mind, I feel like rcu_access_pointer() is exactly what we
> need here. It is also more understandable, even though I agree in
> practice there are no differences in this case.
>
> Thanks,
> Miquèl
^ permalink raw reply
* Re: [PATCH] ieee802154: hwsim: serialize pib updates to fix double-free
From: Yousef Alhouseen @ 2026-07-18 12:20 UTC (permalink / raw)
To: miquel.raynal, devnexen
Cc: alex.aring, stable, syzbot+60332fd095f8bb2946ad, stefan,
andrew+netdev, davem, edumazet, kuba, pabeni, linux-wpan, netdev,
linux-kernel
In-Reply-To: <87h5m2g70l.fsf@bootlin.com>
Yes. I'll send v2 of my teardown patch with rcu_access_pointer(). It
is separate from David's patch: mine moves the final PIB free after
unregister, while David's serializes concurrent runtime PIB
replacements. I don't think his patch is superseded by mine.
Thanks,
Yousef
On Mon, 13 Jul 2026 18:59:38 +0200, Miquel Raynal
<miquel.raynal@bootlin.com> wrote:
> Hello David,
>
> On 09/07/2026 at 23:18:58 +01, David Carlier <devnexen@gmail.com> wrote:
>
> > hwsim_update_pib() does an unserialized read-swap-free of phy->pib:
> >
> > pib_old = rtnl_dereference(phy->pib);
> > ...
> > rcu_assign_pointer(phy->pib, pib);
> > kfree_rcu(pib_old, rcu);
> >
> > It assumes the RTNL is held, but ->set_channel is not always called
> > under it: the mac802154 scan worker changes channels via
> > drv_set_channel() without the RTNL. Such an update can race an
> > RTNL-held one on the same phy; both read the same pib_old and both
> > kfree_rcu() it, double-freeing the object. With SLUB percpu sheaves
> > batching kfree_rcu(), this surfaces as a KASAN invalid-free in
> > rcu_free_sheaf().
> >
> > struct hwsim_phy has no lock for pib. Add one and make the swap atomic
> > with rcu_replace_pointer() under it, dropping the misleading
> > rtnl_dereference().
> >
> > Reported-by: syzbot+60332fd095f8bb2946ad@syzkaller.appspotmail.com
> > Closes: https://syzkaller.appspot.com/bug?extid=60332fd095f8bb2946ad
> > Fixes: f25da51fdc38 ("ieee802154: hwsim: add replacement for fakelb")
> > Signed-off-by: David Carlier <devnexen@gmail.com>
> > Cc: <stable@vger.kernel.org>
>
> Thank you for the patch, but I think Yousef already provided a similar
> patch:
>
> https://lore.kernel.org/all/20260627235805.17310-1-alhouseenyousef@gmail.com/
>
> Yousef, can you confirm you will send v2 soon?
>
> Thanks,
> Miquèl
^ permalink raw reply
* Re: [REGRESSION][BISECTED] stmmac: suspend hangs since 1b9707e6f1a9 ("net: stmmac: enable RPS and RBU interrupts")
From: Maxime Chevallier @ 2026-07-18 13:11 UTC (permalink / raw)
To: tresonic, Andrew Lunn; +Cc: netdev, regressions, rmk+kernel, kuba
In-Reply-To: <97d803a5-ca6e-4d4a-adc2-f97cabfded65@mail.de>
Hi,
On 7/18/26 09:35, tresonic wrote:
> Thank you for you explanations!
>
>> The interrupt is being enabled in the init_chan call in
>> stmmac_dma_ops. Ideally, it should be disabled in a mirror function,
>> which currently does not exist. So maybe deinit_chan() needs
>> adding. But where to call it from? init_chan() is called from
>> stmmac_init_dma_engine(), from stmmac_hw_setup(). stmmac_resume() does
>> call this. So we need something in stmmac_suspend(). Maybe in
>> stmmac_stop_all_dma()?
>>
>> stmmac is messy, there are often not mirror functions. If there is a
>> stmmac_init_dma_engine() there should be
>> stmmac_deinit_dma_engine(). If there is stmmac_hw_setup() there should
>> be stmmac_hw_tairdown(). But none of these seem to exist.
>>
(sorry I missed that thread, I was on my way back from netdev)
>> Anyway, do you want to try to implement deinit_chan() and call it from
>> stmmac_stop_all_dma()?
> Yes I'd really like to implement a solution here.
> This is my try, but I still have some questions:
> - is it ok to disable all interrupts on deinit_chan()?
It mirrors the init, so it should be fine. Now I'm not sure how that
will interfere with things like WoL though, I've yet to test this.
> - maybe the interrupt could also just be disabled in stop_rx?
I don't think so, if something is missing w.r.t the interrupts being
enabled when they shouldn't, that would need to be addressed in the
xdp part, as this seems to be the only place where stop_rx is called
without the dma_chan interrupts being masked.
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c b/drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c
> index 829a23bdad01..65c243fb829f 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c
[...]
I've given this patch a test on imx8mp (that has a dwmac4.10), no regressions found
from running basic tests :) I think this is a good fix, if you submit it can you
address both dwmac410 and dwmac4 ? They both should be impacted by that problem.
Maxime
^ permalink raw reply
* Re: [REGRESSION][BISECTED] stmmac: suspend hangs since 1b9707e6f1a9 ("net: stmmac: enable RPS and RBU interrupts")
From: tresonic @ 2026-07-18 13:32 UTC (permalink / raw)
To: Maxime Chevallier, Andrew Lunn; +Cc: netdev, regressions, rmk+kernel, kuba
In-Reply-To: <46e90a47-4507-40fe-b74e-efef932e9b62@bootlin.com>
Hi, thanks for testing and feedback!
> I've given this patch a test on imx8mp (that has a dwmac4.10), no regressions found
> from running basic tests :) I think this is a good fix, if you submit it can you
> address both dwmac410 and dwmac4 ? They both should be impacted by that problem.
I've added the deinit_chan for dwmac4.
Sorry for the noob question, how would I submit this fix?
Just commit and separately git send-email to netdev@vger.kernel.org?
These are my currernt changes:
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c b/drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c
index 829a23bdad01..23ffe1adcd0d 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c
@@ -106,6 +106,17 @@ static void dwmac4_dma_init_channel(struct stmmac_priv *priv,
ioaddr + DMA_CHAN_INTR_ENA(dwmac4_addrs, chan));
}
+static void dwmac4_dma_deinit_channel(struct stmmac_priv *priv,
+ void __iomem *ioaddr, u32 chan)
+{
+ const struct dwmac4_addrs *dwmac4_addrs = priv->plat->dwmac4_addrs;
+ u32 value;
+
+ value = readl(ioaddr + DMA_CHAN_INTR_ENA(dwmac4_addrs, chan));
+ value &= ~DMA_CHAN_INTR_DEFAULT_MASK;
+ writel(value, ioaddr + DMA_CHAN_INTR_ENA(dwmac4_addrs, chan));
+}
+
static void dwmac410_dma_init_channel(struct stmmac_priv *priv,
void __iomem *ioaddr,
struct stmmac_dma_cfg *dma_cfg, u32 chan)
@@ -125,6 +136,17 @@ static void dwmac410_dma_init_channel(struct stmmac_priv *priv,
ioaddr + DMA_CHAN_INTR_ENA(dwmac4_addrs, chan));
}
+static void dwmac410_dma_deinit_channel(struct stmmac_priv *priv,
+ void __iomem *ioaddr, u32 chan)
+{
+ const struct dwmac4_addrs *dwmac4_addrs = priv->plat->dwmac4_addrs;
+ u32 value;
+
+ value = readl(ioaddr + DMA_CHAN_INTR_ENA(dwmac4_addrs, chan));
+ value &= ~DMA_CHAN_INTR_DEFAULT_MASK_4_10;
+ writel(value, ioaddr + DMA_CHAN_INTR_ENA(dwmac4_addrs, chan));
+}
+
static void dwmac4_dma_init(void __iomem *ioaddr,
struct stmmac_dma_cfg *dma_cfg)
{
@@ -548,6 +570,7 @@ const struct stmmac_dma_ops dwmac4_dma_ops = {
.reset = dwmac4_dma_reset,
.init = dwmac4_dma_init,
.init_chan = dwmac4_dma_init_channel,
+ .deinit_chan = dwmac4_dma_deinit_channel,
.init_rx_chan = dwmac4_dma_init_rx_chan,
.init_tx_chan = dwmac4_dma_init_tx_chan,
.axi = dwmac4_dma_axi,
@@ -577,6 +600,7 @@ const struct stmmac_dma_ops dwmac410_dma_ops = {
.reset = dwmac4_dma_reset,
.init = dwmac4_dma_init,
.init_chan = dwmac410_dma_init_channel,
+ .deinit_chan = dwmac410_dma_deinit_channel,
.init_rx_chan = dwmac4_dma_init_rx_chan,
.init_tx_chan = dwmac4_dma_init_tx_chan,
.axi = dwmac4_dma_axi,
diff --git a/drivers/net/ethernet/stmicro/stmmac/hwif.h b/drivers/net/ethernet/stmicro/stmmac/hwif.h
index e6317b94fff7..04dafec021b4 100644
--- a/drivers/net/ethernet/stmicro/stmmac/hwif.h
+++ b/drivers/net/ethernet/stmicro/stmmac/hwif.h
@@ -170,6 +170,8 @@ struct stmmac_dma_ops {
void (*init)(void __iomem *ioaddr, struct stmmac_dma_cfg *dma_cfg);
void (*init_chan)(struct stmmac_priv *priv, void __iomem *ioaddr,
struct stmmac_dma_cfg *dma_cfg, u32 chan);
+ void (*deinit_chan)(struct stmmac_priv *priv, void __iomem *ioaddr,
+ u32 chan);
void (*init_rx_chan)(struct stmmac_priv *priv, void __iomem *ioaddr,
struct stmmac_dma_cfg *dma_cfg,
dma_addr_t phy, u32 chan);
@@ -235,6 +237,8 @@ struct stmmac_dma_ops {
stmmac_do_void_callback(__priv, dma, init, __args)
#define stmmac_init_chan(__priv, __args...) \
stmmac_do_void_callback(__priv, dma, init_chan, __priv, __args)
+#define stmmac_deinit_chan(__priv, __args...) \
+ stmmac_do_void_callback(__priv, dma, deinit_chan, __priv, __args)
#define stmmac_init_rx_chan(__priv, __args...) \
stmmac_do_void_callback(__priv, dma, init_rx_chan, __priv, __args)
#define stmmac_init_tx_chan(__priv, __args...) \
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 2a0d7eff88d3..8504ecc3dbeb 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -2560,13 +2560,16 @@ static void stmmac_stop_all_dma(struct stmmac_priv *priv)
{
u8 rx_channels_count = priv->plat->rx_queues_to_use;
u8 tx_channels_count = priv->plat->tx_queues_to_use;
+ u8 max_chan = max(rx_channels_count, tx_channels_count);
u8 chan;
- for (chan = 0; chan < rx_channels_count; chan++)
- stmmac_stop_rx_dma(priv, chan);
-
- for (chan = 0; chan < tx_channels_count; chan++)
- stmmac_stop_tx_dma(priv, chan);
+ for (chan = 0; chan < max_chan; chan++) {
+ if (chan < rx_channels_count)
+ stmmac_stop_rx_dma(priv, chan);
+ if (chan < tx_channels_count)
+ stmmac_stop_tx_dma(priv, chan);
+ stmmac_deinit_chan(priv, priv->ioaddr, chan);
+ }
}
/**
tresonic
^ permalink raw reply related
* [PATCH net-next] selftests/xsk: decouple xskxceiver and xdp apps from test_progs objects
From: Tushar Vyavahare @ 2026-07-18 13:44 UTC (permalink / raw)
To: netdev, magnus.karlsson, maciej.fijalkowski, stfomichev,
kernelxing, davem, kuba, pabeni, ast, daniel, tirthendu.sarkar,
tushar.vyavahare
Cc: bpf
Build xskxceiver, xdp_hw_metadata, and xdp_features from explicit source
lists instead of reusing helper objects produced by test_progs rules.
Reusing shared objects such as network_helpers.o and xsk.o can pull in
test_progs-only dependency chains and trigger unrelated libarena builds
when invoking a single target.
Keep these standalone binaries self-contained so each target builds only
its own required sources and BPF skeleton dependencies.
Signed-off-by: Tushar Vyavahare <tushar.vyavahare@intel.com>
---
tools/testing/selftests/bpf/Makefile | 20 +++++++++++++++-----
1 file changed, 15 insertions(+), 5 deletions(-)
diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
index b642ee489ea6..a6f0ed10ccb4 100644
--- a/tools/testing/selftests/bpf/Makefile
+++ b/tools/testing/selftests/bpf/Makefile
@@ -934,17 +934,27 @@ $(OUTPUT)/test_verifier: test_verifier.c verifier/tests.h $(BPFOBJ) | $(OUTPUT)
$(call msg,BINARY,,$@)
$(Q)$(CC) $(CFLAGS) $(filter %.a %.o %.c,$^) $(LDLIBS) -o $@
-# Include find_bit.c to compile xskxceiver.
-EXTRA_SRC := $(TOOLSDIR)/lib/find_bit.c prog_tests/test_xsk.c prog_tests/test_xsk.h
-$(OUTPUT)/xskxceiver: $(EXTRA_SRC) xskxceiver.c xskxceiver.h $(OUTPUT)/network_helpers.o $(OUTPUT)/xsk.o $(OUTPUT)/xsk_xdp_progs.skel.h $(BPFOBJ) | $(OUTPUT)
+# Keep xskxceiver independent from test_progs object dependencies.
+XSKXCEIVER_SRC := xskxceiver.c xsk.c network_helpers.c \
+ $(TOOLSDIR)/lib/find_bit.c prog_tests/test_xsk.c
+$(OUTPUT)/xskxceiver: $(XSKXCEIVER_SRC) xskxceiver.h xsk.h network_helpers.h \
+ prog_tests/test_xsk.h test_progs.h bpf_util.h \
+ $(OUTPUT)/xsk_xdp_progs.skel.h $(BPFOBJ) | $(OUTPUT)
$(call msg,BINARY,,$@)
$(Q)$(CC) $(CFLAGS) $(filter %.a %.o %.c,$^) $(LDLIBS) -o $@
-$(OUTPUT)/xdp_hw_metadata: xdp_hw_metadata.c $(OUTPUT)/network_helpers.o $(OUTPUT)/xsk.o $(OUTPUT)/xdp_hw_metadata.skel.h | $(OUTPUT)
+XDP_HW_METADATA_SRC := xdp_hw_metadata.c xsk.c network_helpers.c \
+ $(TOOLSDIR)/lib/find_bit.c
+$(OUTPUT)/xdp_hw_metadata: $(XDP_HW_METADATA_SRC) xdp_metadata.h \
+ xsk.h network_helpers.h test_progs.h bpf_util.h \
+ $(OUTPUT)/xdp_hw_metadata.skel.h $(BPFOBJ) | $(OUTPUT)
$(call msg,BINARY,,$@)
$(Q)$(CC) $(CFLAGS) $(filter %.a %.o %.c,$^) $(LDLIBS) -o $@
-$(OUTPUT)/xdp_features: xdp_features.c $(OUTPUT)/network_helpers.o $(OUTPUT)/xdp_features.skel.h | $(OUTPUT)
+XDP_FEATURES_SRC := xdp_features.c network_helpers.c
+$(OUTPUT)/xdp_features: $(XDP_FEATURES_SRC) xdp_features.h network_helpers.h \
+ test_progs.h bpf_util.h $(OUTPUT)/xdp_features.skel.h \
+ $(BPFOBJ) | $(OUTPUT)
$(call msg,BINARY,,$@)
$(Q)$(CC) $(CFLAGS) $(filter %.a %.o %.c,$^) $(LDLIBS) -o $@
--
2.43.0
^ permalink raw reply related
* Re: [REGRESSION][BISECTED] stmmac: suspend hangs since 1b9707e6f1a9 ("net: stmmac: enable RPS and RBU interrupts")
From: Andrew Lunn @ 2026-07-18 14:06 UTC (permalink / raw)
To: tresonic; +Cc: netdev, regressions, rmk+kernel, kuba, Maxime Chevallier
In-Reply-To: <97d803a5-ca6e-4d4a-adc2-f97cabfded65@mail.de>
> {
> u8 rx_channels_count = priv->plat->rx_queues_to_use;
> u8 tx_channels_count = priv->plat->tx_queues_to_use;
> + u8 max_chan = max(rx_channels_count, tx_channels_count);
> u8 chan;
>
> - for (chan = 0; chan < rx_channels_count; chan++)
> - stmmac_stop_rx_dma(priv, chan);
> -
> - for (chan = 0; chan < tx_channels_count; chan++)
> - stmmac_stop_tx_dma(priv, chan);
> + for (chan = 0; chan < max_chan; chan++) {
> + if (chan < rx_channels_count)
> + stmmac_stop_rx_dma(priv, chan);
> + if (chan < tx_channels_count)
> + stmmac_stop_tx_dma(priv, chan);
> + stmmac_deinit_chan(priv, priv->ioaddr, chan);
> + }
It is a personal preference, but i would keep the code simple, stupid,
KISS.
Keep the two loops as they are. And add a third loop calling
stmmac_deinit_chan(). That then mirrors the code in
stmmac_init_dma_engine() which also has three loops.
I would also rename max_chan to dma_csr_ch so it has the same name as
in stmmac_init_dma_engine(). As i said, stmmac has pretty bad naming,
mirror functions are not obvious, but when adding new code, we should
try to do better.
Andrew
^ permalink raw reply
* Re: [REGRESSION][BISECTED] stmmac: suspend hangs since 1b9707e6f1a9 ("net: stmmac: enable RPS and RBU interrupts")
From: Andrew Lunn @ 2026-07-18 14:11 UTC (permalink / raw)
To: tresonic; +Cc: Maxime Chevallier, netdev, regressions, rmk+kernel, kuba
In-Reply-To: <54128253-eb77-48f5-a673-94fb65edb78f@mail.de>
> Sorry for the noob question, how would I submit this fix?
There are two documents for you to read:
https://docs.kernel.org/process/submitting-patches.html
https://www.kernel.org/doc/html/latest/process/maintainer-netdev.html
Since this is a fix, please use the net tree. And include a Fixes: tag
indicating the patch which broke it.
> Just commit and separately git send-email to netdev@vger.kernel.org?
./scripts/get_maintainer.pl will give you a list of email addresses.
Or take a look at
https://b4.docs.kernel.org/en/latest/contributor/prep.html
b4 automates some of the steps in producing patches, keeping track of
versions, working out who to send to etc.
Often with the kernel, the code is easy. Getting the processes correct
is harder. But we are here to help.
Andrew
^ permalink raw reply
* [PATCH net-next] net: stmmac: Simplify ioctl handling
From: Maxime Chevallier @ 2026-07-18 14:38 UTC (permalink / raw)
To: Andrew Lunn, Jakub Kicinski, davem, Eric Dumazet, Paolo Abeni,
Simon Horman, Maxime Coquelin, Alexandre Torgue, Russell King
Cc: Maxime Chevallier, thomas.petazzoni, Alexis Lothoré, netdev,
linux-kernel, linux-arm-kernel, linux-stm32
Now that timestamping is controlled through an NDO, we can simply
call phylink_mii_ioctl() to handle ioctls.
The only functional difference is that phylink_mii_ioctl() ->
phy_mii_ioctl() can handle SIOCSHWTSTAMP, but this no longer happens
as this ioctl is not longer dispatched to the ndo_eth_ioctl().
Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
---
Looking at this, I'm wondering if we can't just get rid of SIOCSHWTSTAMP
handling in phy_mii_ioctl(). Looks like we can ?
.../net/ethernet/stmicro/stmmac/stmmac_main.c | 17 +++--------------
1 file changed, 3 insertions(+), 14 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 2a0d7eff88d3..562d20830b94 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -6371,28 +6371,17 @@ static irqreturn_t stmmac_msi_intr_rx(int irq, void *data)
* @rq: An IOCTL specific structure, that can contain a pointer to
* a proprietary structure used to pass information to the driver.
* @cmd: IOCTL command
- * Description:
- * Currently it supports the phy_mii_ioctl(...) and HW time stamping.
+ * Description: Forward the PHY ioctls to phylink
+ * Return: Zero on success or negative error code.
*/
static int stmmac_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
{
struct stmmac_priv *priv = netdev_priv (dev);
- int ret = -EOPNOTSUPP;
if (!netif_running(dev))
return -EINVAL;
- switch (cmd) {
- case SIOCGMIIPHY:
- case SIOCGMIIREG:
- case SIOCSMIIREG:
- ret = phylink_mii_ioctl(priv->phylink, rq, cmd);
- break;
- default:
- break;
- }
-
- return ret;
+ return phylink_mii_ioctl(priv->phylink, rq, cmd);
}
static int stmmac_setup_tc_block_cb(enum tc_setup_type type, void *type_data,
--
2.55.0
^ permalink raw reply related
* Re: [PATCH v2 3/8] clk: sunxi-ng: a733: Add PRCM CCU
From: Enzo Adriano @ 2026-07-18 14:46 UTC (permalink / raw)
To: Junhui Liu
Cc: Andre Przywara, Michael Turquette, Stephen Boyd, Brian Masney,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai,
Jernej Skrabec, Samuel Holland, Philipp Zabel, Paul Walmsley,
Palmer Dabbelt, Albert Ou, Alexandre Ghiti, Richard Cochran,
Jerome Brunet, linux-clk, devicetree, linux-arm-kernel,
linux-sunxi, linux-kernel, linux-riscv, netdev
In-Reply-To: <20260711-a733-clk-v2-3-974d188cbe0c@pigmoral.tech>
Hi Junhui,
I re-reviewed patch 3 in v2 after Andre pointed out that my RFC reply lacked
a formal tag.
I compared the RFC and v2 PRCM drivers and rechecked v2 against the Allwinner
A733 User Manual V0.92, chapter 4.2.5. I checked all 11 programmable clock
definitions (register offsets and divider/mux/gate fields), all 18 bus-gate
definitions, and all 13 reset-map entries. They match the manual.
The RFC-to-v2 changes do not invalidate that check: the four R timer clocks
move from the MP helper with no M field to the P-only helper while keeping
their offsets and P/mux/gate fields unchanged, and the R PWM identifiers are
renamed while keeping their offset/mux/gate fields unchanged. I also checked
the gate-only BGRs for R-TWD, R-PPU, R-TZMA, and R-CPU-BIST; the manual defines
gate bit 0 but no reset bit for those registers, matching v2.
Reviewed-by: Enzo Adriano <enzo.adriano.code@gmail.com>
This analysis was done with AI assistance and each finding was checked against
the cited sources.
Thanks,
Enzo
^ permalink raw reply
* Re: [PATCH net-next] net/sched: sch_cake: skip clearing unused tins during rate adjustment
From: Jonas Köppeler @ 2026-07-18 15:06 UTC (permalink / raw)
To: Toke Høiland-Jørgensen, Jamal Hadi Salim, Jiri Pirko,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Simon Horman
Cc: cake, netdev, linux-kernel, Mike Pham
In-Reply-To: <87wluuj9ue.fsf@toke.dk>
On 7/17/26 10:31, Toke Høiland-Jørgensen wrote:
> Jonas Köppeler <j.koeppeler@tu-berlin.de> writes:
>
>> When cake_configure_rates() is called from the dequeue path with
>> rate_adjust=true, it only needs to update the rate parameters. The
>> loop that clears the unused tins is both unnecessary and harmful in
>> this path:
>>
>> - cake_clear_tin() overwrites q->cur_tin and q->cur_flow, which are
>> actively used by cake_dequeue(), corrupting the dequeue state.
>> - iterating over the unused tins and their internal queues to purge
>> packets adds needless overhead to the hot path.
>>
>> Skip the entire loop when rate_adjust is set, as neither
>> cake_clear_tin() nor the mtu_time update are needed when only the
>> rate changes.
>>
>> Fixes: 15c2715a5264 ("net/sched: sch_cake: fixup cake_mq rate adjustment for diffserv config")
>> Signed-off-by: Jonas Köppeler <j.koeppeler@tu-berlin.de>
>> Tested-by: Mike Pham <mikepham4321@gmail.com>
>
> Do you have any performance numbers to show the impact of this?
Yes, the table below shows results from a test setup using vng with
2 network namespaces, with cake/cake_mq attached in one of them:
ns1 -> cake/cake_mq -> ns2
- veth devices are configured with 8 rx/tx queues.
- cake/cake_mq is configured with a 2 Gbit rate limit.
- Running flent's rrul and tcp_nup tests with 32 TCP upstreams:
legend: qdisc mq = cake_mq; mode be = besteffort, ds3 = diffserv3
test nup = tcp_nup; base/load = idle/loaded RTT (ms); tput = Mbit/s
+---------------------+-------+------+------+-------+-------+---------+
| kernel | qdisc | mode | test | base | load | tput |
+---------------------+-------+------+------+-------+-------+---------+
| net-next | cake | be | rrul | 0.075 | 4.76 | 1473.69 |
| net-next | cake | be | nup | 0.078 | 6.23 | 1550.79 |
| net-next | cake | ds3 | rrul | 0.063 | 5.81 | 1526.75 |
| net-next | cake | ds3 | nup | 0.046 | 6.09 | 1761.45 |
+---------------------+-------+------+------+-------+-------+---------+
| net-next | mq | be | rrul | 0.810 | 11.78 | 1469.67 |
| net-next | mq | be | nup | 0.637 | 85.71 | 1243.15 |
| net-next | mq | ds3 | rrul | 0.397 | 15.28 | 1770.06 |
| net-next | mq | ds3 | nup | 0.351 | 15.98 | 1799.39 |
+---------------------+-------+------+------+-------+-------+---------+
| this patch | mq | be | rrul | 0.092 | 0.56 | 1873.40 |
| this patch | mq | be | nup | 0.109 | 1.82 | 1869.12 |
| this patch | mq | ds3 | rrul | 0.097 | 0.98 | 1866.10 |
| this patch | mq | ds3 | nup | 0.101 | 0.51 | 1861.79 |
+---------------------+-------+------+------+-------+-------+---------+
| before 15c2715a5264 | mq | be | rrul | 0.073 | 0.30 | 1895.45 |
| before 15c2715a5264 | mq | be | nup | 0.076 | 0.49 | 1905.57 |
| before 15c2715a5264 | mq | ds3 | rrul | 0.069 | 0.31 | 1896.59 |
| before 15c2715a5264 | mq | ds3 | nup | 0.058 | 0.86 | 1884.01 |
+---------------------+-------+------+------+-------+-------+---------+
Not only is p99 latency drastically reduced -- nearly matching
pre-15c2715a5264 results -- but on current upstream cake_mq,
throughput also increases as a cake mode uses more tins. This points
directly to cake_clear_tin() during reconfig as the cause, since it
clears (max_tins - cur_tins) tins each time. So the fewer tins the
current mode uses, the more get cleared on every reconfig.
Mike ran also some test on OpenWrt, on an IPQ8074A with 4 rx/tx
queues, and saw similar trends. cake_mq is configured with a 2.2 Gbit
rate limit.
Unfortunately, we only have data for 128 TCP upstreams on net-next,
and 64 TCP upstreams for 'this patch'.
+---------------------+-------+------+------+---------+----------+
| kernel | qdisc | mode | test | load | tput |
+---------------------+-------+------+------+---------+----------+
| net-next | mq | be | nup | 468.50 | 50.90 |
| net-next | mq | ds3 | nup | 355.22 | 98.21 |
| net-next | mq | ds4 | nup | 268.28 | 255.84 |
| net-next | mq | ds8 | nup | 7.48 | 2023.66 |
+---------------------+-------+------+------+---------+----------+
| this patch | mq | be | nup | 4.24 | 944.35 |
| this patch | mq | ds3 | nup | 4.27 | 937.75 |
| this patch | mq | ds4 | nup | 4.24 | 936.97 |
| this patch | mq | ds8 | nup | 4.32 | 927.89 |
+---------------------+-------+------+------+---------+----------+
This again shows the same trend: throughput increases and latency
drops as cake_mq is configured with more tins. We're still looking
into why net-next+ds8 reaches close to 2 Gbit/s, while this patch
tops out around 928 Mbit/s.
That said, this patch doesn't solve every issue yet, but it does
remove the regression introduced by commit 15c2715a5264
("net/sched: sch_cake: fixup cake_mq rate adjustment for diffserv
config").
We're continuing to look into further improvements. Let us know if
you'd like to see additional tests :)
- Jonas
>
> -Toke
^ permalink raw reply
* [PATCH] net: stmmac: dwmac4: mask interrupts before stopping DMA in suspend
From: Luis Lang @ 2026-07-18 15:27 UTC (permalink / raw)
To: netdev
Cc: Luis Lang, Andrew Lunn, Maxime Chevallier, Andrew Lunn,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Maxime Coquelin, Alexandre Torgue, Russell King (Oracle),
Ovidiu Panait, Oleksij Rempel, Rohan G Thomas,
moderated list:ARM/STM32 ARCHITECTURE,
moderated list:ARM/STM32 ARCHITECTURE, open list
In-Reply-To: <7941d239-e5f5-43b5-ae0f-20398221e027@mail.de>
Since commit 1b9707e6f1a9 ("net: stmmac: enable RPS and RBU
interrupts"), suspending causes an interrupt storm from the RPS
interrupt.
Fix this by adding a deinit_chan() op to stmmac_dma_ops, which
masks all default dma channel interrupts. This is called from
stmmac_stop_all_dma(), so interrupts don't trigger while suspending.
Fixes: 1b9707e6f1a9 ("net: stmmac: enable RPS and RBU interrupts")
Suggested-by: Andrew Lunn <andrew@lunn.ch>
Suggested-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Signed-off-by: Luis Lang <luis.la@mail.de>
---
.../net/ethernet/stmicro/stmmac/dwmac4_dma.c | 24 +++++++++++++++++++
drivers/net/ethernet/stmicro/stmmac/hwif.h | 4 ++++
.../net/ethernet/stmicro/stmmac/stmmac_main.c | 4 ++++
3 files changed, 32 insertions(+)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c b/drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c
index 829a23bdad01..23ffe1adcd0d 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c
@@ -106,6 +106,17 @@ static void dwmac4_dma_init_channel(struct stmmac_priv *priv,
ioaddr + DMA_CHAN_INTR_ENA(dwmac4_addrs, chan));
}
+static void dwmac4_dma_deinit_channel(struct stmmac_priv *priv,
+ void __iomem *ioaddr, u32 chan)
+{
+ const struct dwmac4_addrs *dwmac4_addrs = priv->plat->dwmac4_addrs;
+ u32 value;
+
+ value = readl(ioaddr + DMA_CHAN_INTR_ENA(dwmac4_addrs, chan));
+ value &= ~DMA_CHAN_INTR_DEFAULT_MASK;
+ writel(value, ioaddr + DMA_CHAN_INTR_ENA(dwmac4_addrs, chan));
+}
+
static void dwmac410_dma_init_channel(struct stmmac_priv *priv,
void __iomem *ioaddr,
struct stmmac_dma_cfg *dma_cfg, u32 chan)
@@ -125,6 +136,17 @@ static void dwmac410_dma_init_channel(struct stmmac_priv *priv,
ioaddr + DMA_CHAN_INTR_ENA(dwmac4_addrs, chan));
}
+static void dwmac410_dma_deinit_channel(struct stmmac_priv *priv,
+ void __iomem *ioaddr, u32 chan)
+{
+ const struct dwmac4_addrs *dwmac4_addrs = priv->plat->dwmac4_addrs;
+ u32 value;
+
+ value = readl(ioaddr + DMA_CHAN_INTR_ENA(dwmac4_addrs, chan));
+ value &= ~DMA_CHAN_INTR_DEFAULT_MASK_4_10;
+ writel(value, ioaddr + DMA_CHAN_INTR_ENA(dwmac4_addrs, chan));
+}
+
static void dwmac4_dma_init(void __iomem *ioaddr,
struct stmmac_dma_cfg *dma_cfg)
{
@@ -548,6 +570,7 @@ const struct stmmac_dma_ops dwmac4_dma_ops = {
.reset = dwmac4_dma_reset,
.init = dwmac4_dma_init,
.init_chan = dwmac4_dma_init_channel,
+ .deinit_chan = dwmac4_dma_deinit_channel,
.init_rx_chan = dwmac4_dma_init_rx_chan,
.init_tx_chan = dwmac4_dma_init_tx_chan,
.axi = dwmac4_dma_axi,
@@ -577,6 +600,7 @@ const struct stmmac_dma_ops dwmac410_dma_ops = {
.reset = dwmac4_dma_reset,
.init = dwmac4_dma_init,
.init_chan = dwmac410_dma_init_channel,
+ .deinit_chan = dwmac410_dma_deinit_channel,
.init_rx_chan = dwmac4_dma_init_rx_chan,
.init_tx_chan = dwmac4_dma_init_tx_chan,
.axi = dwmac4_dma_axi,
diff --git a/drivers/net/ethernet/stmicro/stmmac/hwif.h b/drivers/net/ethernet/stmicro/stmmac/hwif.h
index e6317b94fff7..04dafec021b4 100644
--- a/drivers/net/ethernet/stmicro/stmmac/hwif.h
+++ b/drivers/net/ethernet/stmicro/stmmac/hwif.h
@@ -170,6 +170,8 @@ struct stmmac_dma_ops {
void (*init)(void __iomem *ioaddr, struct stmmac_dma_cfg *dma_cfg);
void (*init_chan)(struct stmmac_priv *priv, void __iomem *ioaddr,
struct stmmac_dma_cfg *dma_cfg, u32 chan);
+ void (*deinit_chan)(struct stmmac_priv *priv, void __iomem *ioaddr,
+ u32 chan);
void (*init_rx_chan)(struct stmmac_priv *priv, void __iomem *ioaddr,
struct stmmac_dma_cfg *dma_cfg,
dma_addr_t phy, u32 chan);
@@ -235,6 +237,8 @@ struct stmmac_dma_ops {
stmmac_do_void_callback(__priv, dma, init, __args)
#define stmmac_init_chan(__priv, __args...) \
stmmac_do_void_callback(__priv, dma, init_chan, __priv, __args)
+#define stmmac_deinit_chan(__priv, __args...) \
+ stmmac_do_void_callback(__priv, dma, deinit_chan, __priv, __args)
#define stmmac_init_rx_chan(__priv, __args...) \
stmmac_do_void_callback(__priv, dma, init_rx_chan, __priv, __args)
#define stmmac_init_tx_chan(__priv, __args...) \
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 2a0d7eff88d3..af29a50ddb89 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -2560,6 +2560,7 @@ static void stmmac_stop_all_dma(struct stmmac_priv *priv)
{
u8 rx_channels_count = priv->plat->rx_queues_to_use;
u8 tx_channels_count = priv->plat->tx_queues_to_use;
+ u8 dma_csr_ch = max(rx_channels_count, tx_channels_count);
u8 chan;
for (chan = 0; chan < rx_channels_count; chan++)
@@ -2567,6 +2568,9 @@ static void stmmac_stop_all_dma(struct stmmac_priv *priv)
for (chan = 0; chan < tx_channels_count; chan++)
stmmac_stop_tx_dma(priv, chan);
+
+ for (chan = 0; chan < dma_csr_ch; chan++)
+ stmmac_deinit_chan(priv, priv->ioaddr, chan);
}
/**
--
2.55.0
^ permalink raw reply related
* Re: [REGRESSION][BISECTED] stmmac: suspend hangs since 1b9707e6f1a9 ("net: stmmac: enable RPS and RBU interrupts")
From: tresonic @ 2026-07-18 15:32 UTC (permalink / raw)
To: Andrew Lunn; +Cc: Maxime Chevallier, netdev, regressions, rmk+kernel, kuba
In-Reply-To: <36957839-b03a-4403-b08e-12bbadd8bc0c@lunn.ch>
On 7/18/26 4:11 PM, Andrew Lunn wrote:
> There are two documents for you to read:
>
> https://docs.kernel.org/process/submitting-patches.html
>
> https://www.kernel.org/doc/html/latest/process/maintainer-netdev.html
>
> Since this is a fix, please use the net tree. And include a Fixes: tag
> indicating the patch which broke it.
>
>> Just commit and separately git send-email to netdev@vger.kernel.org?
>
> ./scripts/get_maintainer.pl will give you a list of email addresses.
I did your suggested change, read through the documents and hope to have
sent everything correctly :)
Thanks for your help,
Luis/tresonic
^ permalink raw reply
* Re: [PATCH net v3] net: dpaa: fix mode setting
From: Christian Zigotzky @ 2026-07-18 16:31 UTC (permalink / raw)
To: Sean Anderson, Michael Walle, Madalin Bucur, Andrew Lunn,
David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Christian Zigotzky
Cc: netdev, linux-kernel, linuxppc-dev, R.T.Dickinson, mad skateman,
Damien Stewart
In-Reply-To: <4f7497cf-83ed-47cd-2e7b-d06ebe319b61@linux.dev>
On 17/07/26 23:10, Sean Anderson wrote:
> On 7/17/26 09:20, Michael Walle wrote:
>> Before converting to the phylink interface, the init function would have
>> set a non-reserved I/F mode in the maccfg2 register. After converting to
>> phylink, 0 is written as mode, which is a reserved value (although it's
>> the hardware default). Without a valid mode, a SGMII link is never
>> established between the MAC and the PHY and thus .link_up() is never
>> called which could set the correct mode according to the actual speed.
>>
>> Fix it by setting the maximum speed of the phy_interface_t in use in
>> .mac_config() - just like the driver did before the phylink conversion.
>>
>> Fixes: 5d93cfcf7360 ("net: dpaa: Convert to phylink")
>> Suggested-by: Sean Anderson <sean.anderson@linux.dev>
>> Signed-off-by: Michael Walle <mwalle@kernel.org>
>> ---
>> I didn't grab Sean's Rb tag as this is somewhat different.
>>
>> Changes in v3:
>> - keep the mode setting also in .adjust_link().
>> - reword the commit message, to be (hopefully) more precise
>> - Link to v2:
>> https://lore.kernel.org/r/20260710143430.2276141-1-mwalle@kernel.org/
>>
>> Changes in v2:
>> - the setting is/was based on the maximum speed, not the current
>> speed. thus, move the setting into mac_config().
>> - Link to v1:
>> https://lore.kernel.org/r/20260706121011.1948906-1-mwalle@kernel.org/
>>
>> .../net/ethernet/freescale/fman/fman_dtsec.c | 17 ++++++++++++-----
>> 1 file changed, 12 insertions(+), 5 deletions(-)
>>
>> diff --git a/drivers/net/ethernet/freescale/fman/fman_dtsec.c
>> b/drivers/net/ethernet/freescale/fman/fman_dtsec.c
>> index fe35703c509e..b8d70c0ecb6c 100644
>> --- a/drivers/net/ethernet/freescale/fman/fman_dtsec.c
>> +++ b/drivers/net/ethernet/freescale/fman/fman_dtsec.c
>> @@ -900,22 +900,28 @@ static void dtsec_mac_config(struct
>> phylink_config *config, unsigned int mode,
>> {
>> struct mac_device *mac_dev = fman_config_to_mac(config);
>> struct dtsec_regs __iomem *regs = mac_dev->fman_mac->regs;
>> - u32 tmp;
>> + u32 ecntrl, maccfg2;
>> +
>> + maccfg2 = ioread32be(®s->maccfg2);
>> + maccfg2 &= ~(MACCFG2_NIBBLE_MODE | MACCFG2_BYTE_MODE);
>> switch (state->interface) {
>> case PHY_INTERFACE_MODE_RMII:
>> - tmp = DTSEC_ECNTRL_RMM;
>> + ecntrl = DTSEC_ECNTRL_RMM;
>> + maccfg2 |= MACCFG2_NIBBLE_MODE;
>> break;
>> case PHY_INTERFACE_MODE_RGMII:
>> case PHY_INTERFACE_MODE_RGMII_ID:
>> case PHY_INTERFACE_MODE_RGMII_RXID:
>> case PHY_INTERFACE_MODE_RGMII_TXID:
>> - tmp = DTSEC_ECNTRL_GMIIM | DTSEC_ECNTRL_RPM;
>> + ecntrl = DTSEC_ECNTRL_GMIIM | DTSEC_ECNTRL_RPM;
>> + maccfg2 |= MACCFG2_BYTE_MODE;
>> break;
>> case PHY_INTERFACE_MODE_SGMII:
>> case PHY_INTERFACE_MODE_1000BASEX:
>> case PHY_INTERFACE_MODE_2500BASEX:
>> - tmp = DTSEC_ECNTRL_TBIM | DTSEC_ECNTRL_SGMIIM;
>> + ecntrl = DTSEC_ECNTRL_TBIM | DTSEC_ECNTRL_SGMIIM;
>> + maccfg2 |= MACCFG2_BYTE_MODE;
>> break;
>> default:
>> dev_warn(mac_dev->dev, "cannot configure dTSEC for %s\n",
>> @@ -923,7 +929,8 @@ static void dtsec_mac_config(struct
>> phylink_config *config, unsigned int mode,
>> return;
>> }
>> - iowrite32be(tmp, ®s->ecntrl);
>> + iowrite32be(ecntrl, ®s->ecntrl);
>> + iowrite32be(maccfg2, ®s->maccfg2);
>> }
>> static void dtsec_link_up(struct phylink_config *config, struct
>> phy_device *phy,
>
> Reviewed-by: Sean Anderson <sean.anderson@linux.dev>
>
> Christian, can you test this patch with ethernet at 100/1G speed if
> you still have
> access to those P5020/P5040 boards?
>
> https://lore.kernel.org/all/0bfc8f3d-cb62-25f4-2590-ff424adbe48a@xenosoft.de/
>
I tested the patch today. I don't see any differences.
Further information:
https://github.com/chzigotzky/kernels/releases/tag/v7.2.0-rc3-fman-dtsec-patch
Christian
--
Sent with BrassMonkey 34.2.2 (https://github.com/chzigotzky/Web-Browsers-and-Suites-for-Linux-PPC/releases/tag/BrassMonkey_34.2.2)
^ permalink raw reply
* [PATCH net-next 1/2] igb: detect M88E1112 100BASE-FX SGMII mode
From: Pawel Dembicki @ 2026-07-18 16:52 UTC (permalink / raw)
To: netdev
Cc: Pawel Dembicki, Tony Nguyen, Przemek Kitszel, Andrew Lunn,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
intel-wired-lan, linux-kernel
The M88E1112 can be strapped or EEPROM-configured to bridge SGMII
to 100BASE-FX. In this mode the driver still needs the SGMII PHY
register access path to identify the external PHY, but the MAC link
setup must follow the SERDES media path rather than copper setup.
Decode the M88E1112 MAC Control 1 mode field and switch the I210
media type and physical interface setup callback when the PHY reports
100BASE-FX mode.
The driver only observes the Marvell mode. It does not program the
88E1112 registers or its EEPROM. The board must configure it
through firmware or straps before probe.
Assisted-by: Codex:GPT-5
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
---
drivers/net/ethernet/intel/igb/e1000_82575.c | 12 +++++++++++-
drivers/net/ethernet/intel/igb/e1000_defines.h | 1 +
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/igb/e1000_82575.c b/drivers/net/ethernet/intel/igb/e1000_82575.c
index 44a85ad749a4..72c42d9d6f47 100644
--- a/drivers/net/ethernet/intel/igb/e1000_82575.c
+++ b/drivers/net/ethernet/intel/igb/e1000_82575.c
@@ -264,9 +264,19 @@ static s32 igb_init_phy_params_82575(struct e1000_hw *hw)
data = FIELD_GET(E1000_M88E1112_MAC_CTRL_1_MODE_MASK,
data);
if (data == E1000_M88E1112_AUTO_COPPER_SGMII ||
- data == E1000_M88E1112_AUTO_COPPER_BASEX)
+ data == E1000_M88E1112_AUTO_COPPER_BASEX) {
hw->mac.ops.check_for_link =
igb_check_for_link_media_swap;
+ } else if (data == E1000_M88E1112_100BASE_FX) {
+ /* The driver only detects this strap/EEPROM
+ * mode. 88E1112 register and EEPROM setup must
+ * be done outside igb before probe/reset.
+ */
+ hw->phy.media_type =
+ e1000_media_type_internal_serdes;
+ hw->mac.ops.setup_physical_interface =
+ igb_setup_serdes_link_82575;
+ }
}
if (phy->id == M88E1512_E_PHY_ID) {
ret_val = igb_initialize_M88E1512_phy(hw);
diff --git a/drivers/net/ethernet/intel/igb/e1000_defines.h b/drivers/net/ethernet/intel/igb/e1000_defines.h
index 7e6f9aa2d57b..25104328eae6 100644
--- a/drivers/net/ethernet/intel/igb/e1000_defines.h
+++ b/drivers/net/ethernet/intel/igb/e1000_defines.h
@@ -615,6 +615,7 @@
#define E1000_MEDIA_PORT_COPPER 1
#define E1000_MEDIA_PORT_OTHER 2
+#define E1000_M88E1112_100BASE_FX 0x0
#define E1000_M88E1112_AUTO_COPPER_SGMII 0x2
#define E1000_M88E1112_AUTO_COPPER_BASEX 0x3
#define E1000_M88E1112_STATUS_LINK 0x0004 /* Interface Link Bit */
--
2.43.0
^ permalink raw reply related
* [PATCH net-next 2/2] igb: read SFP module EEPROM through igb_read_sfp_data_byte
From: Pawel Dembicki @ 2026-07-18 16:56 UTC (permalink / raw)
To: netdev
Cc: Pawel Dembicki, Tony Nguyen, Przemek Kitszel, Andrew Lunn,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
intel-wired-lan, linux-kernel
igb_get_module_info() and igb_get_module_eeprom() use
igb_read_phy_reg_i2c(), which accesses the external PHY register space.
On designs with an external SGMII PHY this returns PHY register contents
instead of the SFP module EEPROM requested by ethtool -m.
Use igb_read_sfp_data_byte() for module EEPROM reads. The legacy
ethtool module EEPROM offset space maps directly to the I210 I2CCMD
module address space: offsets 0x000-0x0ff address the SFP base EEPROM
and offsets 0x100-0x1ff address the diagnostics EEPROM.
Assisted-by: Codex:GPT-5
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
---
drivers/net/ethernet/intel/igb/igb_ethtool.c | 40 ++++++--------------
1 file changed, 12 insertions(+), 28 deletions(-)
diff --git a/drivers/net/ethernet/intel/igb/igb_ethtool.c b/drivers/net/ethernet/intel/igb/igb_ethtool.c
index 65014a54a6d1..0fb15bd940d7 100644
--- a/drivers/net/ethernet/intel/igb/igb_ethtool.c
+++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c
@@ -3209,7 +3209,7 @@ static int igb_get_module_info(struct net_device *netdev,
struct igb_adapter *adapter = netdev_priv(netdev);
struct e1000_hw *hw = &adapter->hw;
u32 status = 0;
- u16 sff8472_rev, addr_mode;
+ u8 sff8472_rev, addr_mode;
bool page_swap = false;
if ((hw->phy.media_type == e1000_media_type_copper) ||
@@ -3217,22 +3217,26 @@ static int igb_get_module_info(struct net_device *netdev,
return -EOPNOTSUPP;
/* Check whether we support SFF-8472 or not */
- status = igb_read_phy_reg_i2c(hw, IGB_SFF_8472_COMP, &sff8472_rev);
+ status = igb_read_sfp_data_byte(hw,
+ E1000_I2CCMD_SFP_DATA_ADDR(IGB_SFF_8472_COMP),
+ &sff8472_rev);
if (status)
return -EIO;
/* addressing mode is not supported */
- status = igb_read_phy_reg_i2c(hw, IGB_SFF_8472_SWAP, &addr_mode);
+ status = igb_read_sfp_data_byte(hw,
+ E1000_I2CCMD_SFP_DATA_ADDR(IGB_SFF_8472_SWAP),
+ &addr_mode);
if (status)
return -EIO;
/* addressing mode is not supported */
- if ((addr_mode & 0xFF) & IGB_SFF_ADDRESSING_MODE) {
+ if (addr_mode & IGB_SFF_ADDRESSING_MODE) {
hw_dbg("Address change required to access page 0xA2, but not supported. Please report the module type to the driver maintainers.\n");
page_swap = true;
}
- if ((sff8472_rev & 0xFF) == IGB_SFF_8472_UNSUP || page_swap) {
+ if (sff8472_rev == IGB_SFF_8472_UNSUP || page_swap) {
/* We have an SFP, but it does not support SFF-8472 */
modinfo->type = ETH_MODULE_SFF_8079;
modinfo->eeprom_len = ETH_MODULE_SFF_8079_LEN;
@@ -3251,37 +3255,17 @@ static int igb_get_module_eeprom(struct net_device *netdev,
struct igb_adapter *adapter = netdev_priv(netdev);
struct e1000_hw *hw = &adapter->hw;
u32 status = 0;
- u16 *dataword;
- u16 first_word, last_word;
int i = 0;
if (ee->len == 0)
return -EINVAL;
- first_word = ee->offset >> 1;
- last_word = (ee->offset + ee->len - 1) >> 1;
-
- dataword = kmalloc_array(last_word - first_word + 1, sizeof(u16),
- GFP_KERNEL);
- if (!dataword)
- return -ENOMEM;
-
- /* Read EEPROM block, SFF-8079/SFF-8472, word at a time */
- for (i = 0; i < last_word - first_word + 1; i++) {
- status = igb_read_phy_reg_i2c(hw, (first_word + i) * 2,
- &dataword[i]);
- if (status) {
- /* Error occurred while reading module */
- kfree(dataword);
+ for (i = 0; i < ee->len; i++) {
+ status = igb_read_sfp_data_byte(hw, ee->offset + i, &data[i]);
+ if (status)
return -EIO;
- }
-
- be16_to_cpus(&dataword[i]);
}
- memcpy(data, (u8 *)dataword + (ee->offset & 1), ee->len);
- kfree(dataword);
-
return 0;
}
--
2.43.0
^ permalink raw reply related
* Re: [PATCH v2] PCI: Move pci_dev->is_busmaster into priv_flags
From: Maurice Hieronymus @ 2026-07-18 17:02 UTC (permalink / raw)
To: Lukas Wunner, Maurice Hieronymus
Cc: Edward Cree, Andrew Lunn, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Bjorn Helgaas, Justin Tee, Paul Ely,
James E.J. Bottomley, Martin K. Petersen, Juergen Gross,
Stefano Stabellini, Oleksandr Tyshchenko, Miguel Ojeda,
Boqun Feng, Gary Guo, Björn Roy Baron, Benno Lossin,
Andreas Hindborg, Alice Ryhl, Trevor Gross, Daniel Almeida,
Tamir Duberstein, Alexandre Courbot, Onur Özkan,
Borislav Petkov, Tony Luck, Danilo Krummrich, rust-for-linux,
netdev, linux-net-drivers, linux-kernel, linux-pci, linux-scsi,
xen-devel, linux-edac
In-Reply-To: <alcSjoypegNolW48@wunner.de>
On Wed Jul 15, 2026 at 6:54 AM CEST, Lukas Wunner wrote:
> pci_dev_assign_busmaster() should not have public visibility.
> Drivers should really use pci_set_master() / pci_clear_master()
> and nothing else.
>
> It seems Xen is the only one in the tree which needs this:
>
>> +++ b/drivers/xen/xen-pciback/pciback_ops.c
>> @@ -125,14 +125,14 @@ void xen_pcibk_reset_device(struct pci_dev *dev)
>> if (pci_is_enabled(dev))
>> pci_disable_device(dev);
>>
>> - dev->is_busmaster = 0;
>> + pci_dev_assign_busmaster(dev, false);
>> } else {
>> pci_read_config_word(dev, PCI_COMMAND, &cmd);
>> if (cmd & (PCI_COMMAND_INVALIDATE)) {
>> cmd &= ~(PCI_COMMAND_INVALIDATE);
>> pci_write_config_word(dev, PCI_COMMAND, cmd);
>>
>> - dev->is_busmaster = 0;
>> + pci_dev_assign_busmaster(dev, false);
>> }
>> }
>> }
>
> Please change these direct assignments to pci_clear_master(),
> preferably in a separate patch to ease bisecting if anything
> breaks.
This conversion does not preserve behavior. The direct assignments
clear only the software flag, while pci_clear_master() also clears
PCI_COMMAND_MASTER in config space.
I am not an expert on xen devices. That's why I want to clarify first
that this does not break anything. Especially since commit
7681f31ec9cd ("xen/pciback: Don't disable PCI_COMMAND on PCI device
reset.") deliberately removed the PCI_COMMAND write right above the
first assignment, and pci_clear_master() would reintroduce a
PCI_COMMAND write there.
Best,
Maurice
^ permalink raw reply
* [PATCH RFC v3 00/11] leds: Add support for hardware-initiated hardware control trigger transition
From: Rong Zhang @ 2026-07-18 17:05 UTC (permalink / raw)
To: Lee Jones, Pavel Machek, Jonathan Corbet, Shuah Khan,
Thomas Weißschuh, Benson Leung, Guenter Roeck,
Marek Behún, Mark Pearson, Derek J. Clark, Hans de Goede,
Ilpo Järvinen, Ike Panhc
Cc: Andrew Lunn, Jakub Kicinski, Vishnu Sankar, Vishnu Sankar,
linux-leds, netdev, linux-doc, linux-kernel, chrome-platform,
platform-driver-x86, Rong Zhang
Some laptops can tune their keyboard backlight according to ambient
light sensors (auto mode). This capability is essentially a hardware
control trigger. Meanwhile, such laptops also offer a shrotcut for
cycling through brightness levels and auto mode. For example, on
ThinkBook, pressing Fn+Space ("shortcut") cycles keyboard backlight
levels in the following sequence:
1 => 2 => 0 => auto => 1 ...
Recent ThinkPad models should have similar sequence too.
However, there are some issues preventing us from using a private
hardware control trigger:
1. We want a mechanism to tell userspace which trigger is the hardware
control one, so that userspace can determine if auto mode is on/off,
as well as turing it on/off programmatically without obtaining the
trigger's name via other channels
2. Writing brightness has the side effect of disabling hardware control,
but the hardware control trigger remains active, resulting in the
software and hardware being out of sync. Most LED drivers that
supports hardware control also suffer from the same issue
3. Turing on/off auto mode via the shortcut cannot activate/deactivate
the corresponding hardware control trigger, making the software state
out of sync
4. Even with #3 solved, deactivating the hardware control trigger has
the side effect of emitting LED_OFF, breaking the shortcut cycle,
especially "auto => 1"
This RFC series tries to demonstrate a path on solving these issues:
- Introduce an attribute "trigger_may_offload", so that userspace can
determine:
- if the LED device supports hardware control (supported => visible)
- which trigger is the hardware control trigger selected by the LED
device
- if the trigger is selected ("<foo_trigger>")
- if the trigger is offloaded ("[foo_trigger]")
- A callback offloaded() is added so that LED triggers can report
their hardware control state
- Remove hardware control trigger when writing brightness
- Add led_trigger_notify_hw_control_changed() interface, so that LED
drivers can notify the LED core about hardware-initiated hardware
control transitions. The LED core will then determine if the
transition is allowed and switching between "none" (i.e., no trigger)
and the device's private trigger accordingly
- This capability is restricted to the device's private trigger. If
the current trigger is neither the private trigger nor "none", no
transition will be made
- This interface is gated behind Kconfig LEDS_TRIGGERS_HW_CHANGED and
LED device flag LED_TRIG_HW_CHANGED
- Tune the logic of trigger deactivation so that it won't emit LED_OFF
when the deactivation is triggered by hardware
The last three patches are included in the RFC series to demonstrate how
to these interfaces are supposed to be utilized, so that ideapad-laptop
can expose the auto mode of ThinkBook's keyboard backlight. They can be
submitted separately once the dust settles, if preferred.
[ Summary of other approaches ]
< custom attribute >
Pros:
- simplicity, KISS
- no need to touch the LED core
- extensible as long as it has a sensor-neutral name
- a sensor-related name could potentially lead to a mess if a future
device implements auto mode based on multiple different sensors
Cons:
- must have zero influence on brightness_set[_blocking] callbacks
in order not to break triggers
- potential interference with triggers and the brightness attribute,
can't solve #2
- weird semantic (an attribute other than "brightness" and "trigger"
changes the brightness)
< private hardware control trigger (this series) >
Pros:
- mutually exclusive with other triggers and the brightness attribute
(hence less chaos)
- semantic correctness
- acts as an aggregate switch to turn on/off auto mode even a future
device implements auto mode based on multiple different sensors
- extensibility (through trigger attributes)
Cons:
- complexity
[ Previous discussion threads ]
https://lore.kernel.org/r/08580ec5-1d7b-4612-8a3f-75bc2f40aad2@app.fastmail.com
https://lore.kernel.org/r/1dbfcf656cdb4af0299f90d7426d2ec7e2b8ac9e.camel@rong.moe
Signed-off-by: Rong Zhang <i@rong.moe>
---
Changes in v3:
- Integrate https://lore.kernel.org/all/20260712-leds-hw-control-brightness-set-v1-1-1de593b09d26@rong.moe/
into the series
- Adopt __led_trigger_is_hw_controlled() in the rest of the series
- Rearrange the series so that the code using the offloaded() callback is
introduced before the driver implementation (thanks Thomas Weißschuh)
- Reword documentations and commit messages (ditto)
- Adopt guard() and lockdep (ditto)
- Address concerns from Sashiko
- Fix a race condition in ideapad_kbd_bl_led_cdev_brightness_set()
- Fix trigger re-registration of ideapad_kbd_bl_auto_trigger
- https://sashiko.dev/#/patchset/20260618-leds-trigger-hw-changed-v2-0-c28c44053cf3%40rong.moe
- Make registration failures of ideapad_kbd_bl_auto_trigger non-fatal
- Link to v2: https://patch.msgid.link/20260618-leds-trigger-hw-changed-v2-0-c28c44053cf3@rong.moe
Changes in v2:
- Restrict the led_trigger_notify_hw_control_changed() interface to
private triggers only
- Drop PATCH v1 1/9 ("leds: Load trigger modules on-demand if used as
hw control trigger"), not relavant any more
- Gate the led_trigger_notify_hw_control_changed() interface behind
Kconfig LEDS_TRIGGERS_HW_CHANGED and LED device flag
LED_TRIG_HW_CHANGED
- Fix lock ordering inversion
- ideapad-laptop:
- Only call led_trigger_notify_hw_control_changed() when needed
- Serialize keyboard backlight notifications
- Reword commit messages and documentations
- Link to v1: https://patch.msgid.link/20260227190617.271388-1-i@rong.moe
---
Rong Zhang (11):
leds: Move led_trigger_is_hw_controlled() to the right place
leds: class: Remove hardware control trigger when writing brightness
leds: trigger: Add offloaded() callback and provide trigger_may_offload attribute
leds: cros_ec: trigger: Implement offloaded() callback
leds: turris-omnia: trigger: Implement offloaded() and declare hw_control_trigger
leds: trigger: netdev: Implement offloaded() callback
leds: trigger: Enforce strict checks in led_trigger_is_hw_controlled()
leds: trigger: Add led_trigger_notify_hw_control_changed() interface
platform/x86: ideapad-laptop: Decouple hardware & classdev brightness for keyboard backlight
platform/x86: ideapad-laptop: Serialize keyboard backlight notifications
platform/x86: ideapad-laptop: Fully support auto keyboard backlight
Documentation/ABI/testing/sysfs-class-led | 25 ++
.../ABI/testing/sysfs-class-led-trigger-netdev | 3 +
Documentation/leds/leds-class.rst | 72 ++++++
drivers/leds/led-class.c | 35 ++-
drivers/leds/led-triggers.c | 146 +++++++++++-
drivers/leds/leds-cros_ec.c | 6 +
drivers/leds/leds-turris-omnia.c | 7 +
drivers/leds/leds.h | 2 +
drivers/leds/trigger/Kconfig | 9 +
drivers/leds/trigger/ledtrig-netdev.c | 8 +
drivers/platform/x86/lenovo/Kconfig | 1 +
drivers/platform/x86/lenovo/ideapad-laptop.c | 264 ++++++++++++++++-----
include/linux/leds.h | 19 ++
13 files changed, 532 insertions(+), 65 deletions(-)
---
base-commit: 1229e2e57a5c2980ccd457b9b53ea0eed5a22ab3
change-id: 20260506-leds-trigger-hw-changed-96a62188cbdf
Thanks,
Rong
^ permalink raw reply
* [PATCH RFC v3 01/11] leds: Move led_trigger_is_hw_controlled() to the right place
From: Rong Zhang @ 2026-07-18 17:05 UTC (permalink / raw)
To: Lee Jones, Pavel Machek, Jonathan Corbet, Shuah Khan,
Thomas Weißschuh, Benson Leung, Guenter Roeck,
Marek Behún, Mark Pearson, Derek J. Clark, Hans de Goede,
Ilpo Järvinen, Ike Panhc
Cc: Andrew Lunn, Jakub Kicinski, Vishnu Sankar, Vishnu Sankar,
linux-leds, netdev, linux-doc, linux-kernel, chrome-platform,
platform-driver-x86, Rong Zhang
In-Reply-To: <20260719-leds-trigger-hw-changed-v3-0-5fb55722e36e@rong.moe>
Currently led_trigger_is_hw_controlled() is placed at led-class.c, which
is not an right place as it falls into the triggers namespace and does
triggers stuff.
Move it into led-triggers.c, and split it into locked and unlocked
variant for convenience.
Fixes: b819dc7d8fb2 ("leds: core: Report ENODATA for brightness of hardware controlled LED")
Signed-off-by: Rong Zhang <i@rong.moe>
---
Changes in v3:
- New patch in the series, the dependency of the following patches
---
drivers/leds/led-class.c | 10 ----------
drivers/leds/led-triggers.c | 19 +++++++++++++++++++
include/linux/leds.h | 8 ++++++++
3 files changed, 27 insertions(+), 10 deletions(-)
diff --git a/drivers/leds/led-class.c b/drivers/leds/led-class.c
index a51b0ed53886..1b8b688aaaaf 100644
--- a/drivers/leds/led-class.c
+++ b/drivers/leds/led-class.c
@@ -27,16 +27,6 @@ static LIST_HEAD(leds_lookup_list);
static struct workqueue_struct *leds_wq;
-static bool led_trigger_is_hw_controlled(struct led_classdev *led_cdev)
-{
-#ifdef CONFIG_LEDS_TRIGGERS
- guard(rwsem_read)(&led_cdev->trigger_lock);
- return led_cdev->trigger && led_cdev->trigger->trigger_type;
-#else
- return false;
-#endif
-}
-
static ssize_t brightness_show(struct device *dev,
struct device_attribute *attr, char *buf)
{
diff --git a/drivers/leds/led-triggers.c b/drivers/leds/led-triggers.c
index b1223218bda1..bf2543538ed0 100644
--- a/drivers/leds/led-triggers.c
+++ b/drivers/leds/led-triggers.c
@@ -7,9 +7,11 @@
* Author: Richard Purdie <rpurdie@openedhand.com>
*/
+#include <linux/cleanup.h>
#include <linux/export.h>
#include <linux/kernel.h>
#include <linux/list.h>
+#include <linux/lockdep.h>
#include <linux/spinlock.h>
#include <linux/device.h>
#include <linux/timer.h>
@@ -33,6 +35,23 @@ trigger_relevant(struct led_classdev *led_cdev, struct led_trigger *trig)
return !trig->trigger_type || trig->trigger_type == led_cdev->trigger_type;
}
+static bool __led_trigger_is_hw_controlled(struct led_classdev *led_cdev)
+{
+ lockdep_assert_held(&led_cdev->trigger_lock);
+
+ if (!led_cdev->trigger)
+ return false;
+
+ return led_cdev->trigger->trigger_type;
+}
+
+bool led_trigger_is_hw_controlled(struct led_classdev *led_cdev)
+{
+ guard(rwsem_read)(&led_cdev->trigger_lock);
+ return __led_trigger_is_hw_controlled(led_cdev);
+}
+EXPORT_SYMBOL_GPL(led_trigger_is_hw_controlled);
+
ssize_t led_trigger_write(struct file *filp, struct kobject *kobj,
const struct bin_attribute *bin_attr, char *buf,
loff_t pos, size_t count)
diff --git a/include/linux/leds.h b/include/linux/leds.h
index b16b803cc1ac..a630f5a79f6b 100644
--- a/include/linux/leds.h
+++ b/include/linux/leds.h
@@ -534,6 +534,8 @@ void led_trigger_set_default(struct led_classdev *led_cdev);
int led_trigger_set(struct led_classdev *led_cdev, struct led_trigger *trigger);
void led_trigger_remove(struct led_classdev *led_cdev);
+bool led_trigger_is_hw_controlled(struct led_classdev *led_cdev);
+
static inline void led_set_trigger_data(struct led_classdev *led_cdev,
void *trigger_data)
{
@@ -584,6 +586,12 @@ static inline int led_trigger_set(struct led_classdev *led_cdev,
}
static inline void led_trigger_remove(struct led_classdev *led_cdev) {}
+
+static inline bool led_trigger_is_hw_controlled(struct led_classdev *led_cdev)
+{
+ return false;
+}
+
static inline void led_set_trigger_data(struct led_classdev *led_cdev) {}
static inline void *led_get_trigger_data(struct led_classdev *led_cdev)
{
--
2.53.0
^ permalink raw reply related
* [PATCH RFC v3 02/11] leds: class: Remove hardware control trigger when writing brightness
From: Rong Zhang @ 2026-07-18 17:05 UTC (permalink / raw)
To: Lee Jones, Pavel Machek, Jonathan Corbet, Shuah Khan,
Thomas Weißschuh, Benson Leung, Guenter Roeck,
Marek Behún, Mark Pearson, Derek J. Clark, Hans de Goede,
Ilpo Järvinen, Ike Panhc
Cc: Andrew Lunn, Jakub Kicinski, Vishnu Sankar, Vishnu Sankar,
linux-leds, netdev, linux-doc, linux-kernel, chrome-platform,
platform-driver-x86, Rong Zhang
In-Reply-To: <20260719-leds-trigger-hw-changed-v3-0-5fb55722e36e@rong.moe>
Since commit b819dc7d8fb2 ("leds: core: Report ENODATA for brightness of
hardware controlled LED"), the brightness attribute becomes write-only
when the LED is controlled fully by the hardware. A write-only attribute
is very confusing.
Moreover, most LED drivers set hardware brightness innocently with the
side effect of disabling hardware control, but the hardware control
trigger remains active, resulting in the software and hardware being out
of sync.
Fix it by removing the hardware control trigger when writing the
brightness attribute.
This should also match the semantics of hardware control:
When the LED is in hw control, no software blink is possible and
doing so will effectively disable hw control.
Fixes: b819dc7d8fb2 ("leds: core: Report ENODATA for brightness of hardware controlled LED")
Signed-off-by: Rong Zhang <i@rong.moe>
---
Changes in v3:
- New patch in the series, integrated from https://lore.kernel.org/all/20260712-leds-hw-control-brightness-set-v1-1-1de593b09d26@rong.moe/
- The following patches will improve __led_trigger_is_hw_controlled()
to include offloaded generic triggers and take the advantage of it
---
drivers/leds/led-class.c | 3 +++
drivers/leds/led-triggers.c | 9 +++++++++
include/linux/leds.h | 2 ++
3 files changed, 14 insertions(+)
diff --git a/drivers/leds/led-class.c b/drivers/leds/led-class.c
index 1b8b688aaaaf..ab61e41a00a3 100644
--- a/drivers/leds/led-class.c
+++ b/drivers/leds/led-class.c
@@ -64,6 +64,9 @@ static ssize_t brightness_store(struct device *dev,
if (state == LED_OFF)
led_trigger_remove(led_cdev);
+ else
+ led_trigger_remove_hw_control(led_cdev);
+
led_set_brightness(led_cdev, state);
ret = size;
diff --git a/drivers/leds/led-triggers.c b/drivers/leds/led-triggers.c
index bf2543538ed0..804a04b326c4 100644
--- a/drivers/leds/led-triggers.c
+++ b/drivers/leds/led-triggers.c
@@ -287,6 +287,15 @@ void led_trigger_remove(struct led_classdev *led_cdev)
}
EXPORT_SYMBOL_GPL(led_trigger_remove);
+void led_trigger_remove_hw_control(struct led_classdev *led_cdev)
+{
+ guard(rwsem_write)(&led_cdev->trigger_lock);
+
+ if (__led_trigger_is_hw_controlled(led_cdev))
+ led_trigger_set(led_cdev, NULL);
+}
+EXPORT_SYMBOL_GPL(led_trigger_remove_hw_control);
+
static bool led_match_default_trigger(struct led_classdev *led_cdev,
struct led_trigger *trig)
{
diff --git a/include/linux/leds.h b/include/linux/leds.h
index a630f5a79f6b..d7d3dd905432 100644
--- a/include/linux/leds.h
+++ b/include/linux/leds.h
@@ -533,6 +533,7 @@ void led_trigger_blink_oneshot(struct led_trigger *trigger,
void led_trigger_set_default(struct led_classdev *led_cdev);
int led_trigger_set(struct led_classdev *led_cdev, struct led_trigger *trigger);
void led_trigger_remove(struct led_classdev *led_cdev);
+void led_trigger_remove_hw_control(struct led_classdev *led_cdev);
bool led_trigger_is_hw_controlled(struct led_classdev *led_cdev);
@@ -586,6 +587,7 @@ static inline int led_trigger_set(struct led_classdev *led_cdev,
}
static inline void led_trigger_remove(struct led_classdev *led_cdev) {}
+static inline void led_trigger_remove_hw_control(struct led_classdev *led_cdev) {}
static inline bool led_trigger_is_hw_controlled(struct led_classdev *led_cdev)
{
--
2.53.0
^ permalink raw reply related
* [PATCH RFC v3 03/11] leds: trigger: Add offloaded() callback and provide trigger_may_offload attribute
From: Rong Zhang @ 2026-07-18 17:05 UTC (permalink / raw)
To: Lee Jones, Pavel Machek, Jonathan Corbet, Shuah Khan,
Thomas Weißschuh, Benson Leung, Guenter Roeck,
Marek Behún, Mark Pearson, Derek J. Clark, Hans de Goede,
Ilpo Järvinen, Ike Panhc
Cc: Andrew Lunn, Jakub Kicinski, Vishnu Sankar, Vishnu Sankar,
linux-leds, netdev, linux-doc, linux-kernel, chrome-platform,
platform-driver-x86, Rong Zhang
In-Reply-To: <20260719-leds-trigger-hw-changed-v3-0-5fb55722e36e@rong.moe>
There are multiple triggers implementing hardware control. However, the
LED trigger core doesn't really know the hardware control (offloaded)
state since the coordination is done directly between the trigger and
the LED driver. It can only assume private triggers as offloaded and
generic ones as not offloaded.
Add an offloaded() callback so that triggers can report their offloaded
states to the LED trigger core. When unimplemented, it defaults to true
for private triggers and false for generic ones to keep the current
behavior unchanged.
With that, provide a new attribute "trigger_may_offload", so that
userspace can determine:
- if the LED device supports hardware control (supported => visible)
- which trigger is the hardware control trigger selected by the LED
device
- if the trigger is selected ("<foo_trigger>")
- if the trigger is offloaded ("[foo_trigger]")
Note: the documentation describes the attribute as "returning a list"
despite the LED core currently only supports one hardware control
trigger per LED device. This is intentional to make the attribute
extensible in the future without breaking userspace.
Signed-off-by: Rong Zhang <i@rong.moe>
---
Changes in v3:
- Rearrange the series so that the code using the offloaded() callback is
introduced before the driver implementation (thanks Thomas Weißschuh)
- Reword documentation (ditto)
- Adopt guard() and lockdep (ditto)
- Adopt __led_trigger_is_hw_controlled() from newly-integrated PATCH 1
---
Documentation/ABI/testing/sysfs-class-led | 22 ++++++++++++++++++++++
Documentation/leds/leds-class.rst | 20 ++++++++++++++++++++
drivers/leds/led-class.c | 22 ++++++++++++++++++++++
drivers/leds/led-triggers.c | 29 +++++++++++++++++++++++++++++
drivers/leds/leds.h | 2 ++
include/linux/leds.h | 1 +
6 files changed, 96 insertions(+)
diff --git a/Documentation/ABI/testing/sysfs-class-led b/Documentation/ABI/testing/sysfs-class-led
index d4c918cc11a1..b61fc2e71bd3 100644
--- a/Documentation/ABI/testing/sysfs-class-led
+++ b/Documentation/ABI/testing/sysfs-class-led
@@ -78,6 +78,28 @@ Description:
(which would often be configured in the device tree for the
hardware).
+What: /sys/class/leds/<led>/trigger_may_offload
+Date: July 2026
+KernelVersion: 7.3
+Contact: linux-leds@vger.kernel.org
+Description:
+ Names and states of triggers that may be offloaded to hardware.
+ Such triggers are also called "hardware control trigger" in some
+ context.
+
+ Only exists when the LED supports trigger offload.
+
+ Reading this file returns a list of triggers that are capable to
+ be offloaded. The optional brackets around the trigger name
+ indicate the state of the current trigger:
+
+ - `foo_trigger`: the trigger is not selected.
+ - `<foo_trigger>`: the trigger is selected, but falls back to
+ software blink for some reason (e.g., incompatible trigger
+ parameters)
+ - `[foo_trigger]`: the trigger is selected and offloaded to
+ hardware.
+
What: /sys/class/leds/<led>/inverted
Date: January 2011
KernelVersion: 2.6.38
diff --git a/Documentation/leds/leds-class.rst b/Documentation/leds/leds-class.rst
index 3913966cfdac..2d41a6db602c 100644
--- a/Documentation/leds/leds-class.rst
+++ b/Documentation/leds/leds-class.rst
@@ -242,6 +242,9 @@ ops and needs to declare specific support for the supported triggers.
With hw control we refer to the LED driven by hardware.
+A sysfs attribute `trigger_may_offload` is provided for userspace to
+query supported triggers and their states.
+
LED driver must define the following value to support hw control:
- hw_control_trigger:
@@ -298,6 +301,15 @@ LED driver must implement the following API to support hw control:
Returns a pointer to a struct device or NULL if nothing
is currently attached.
+LED trigger should implement the following API to indicate hw control:
+ - offloaded:
+ return a boolean indicating if the trigger is currently
+ offloaded to hardware.
+
+ If a trigger doesn't implement this callback, the default
+ value will be true for private triggers and false for generic
+ ones.
+
LED driver can activate additional modes by default to workaround the
impossibility of supporting each different mode on the supported trigger.
Examples are hardcoding the blink speed to a set interval, enable special
@@ -311,6 +323,14 @@ the end use hw_control_set to activate hw control.
A trigger can use hw_control_get to check if a LED is already in hw control
and init their flags.
+Alternatively, a private trigger can be implemented along with the LED driver if
+the LED's hardware control doesn't fit any generic trigger. To associate the
+private trigger with the LED classdev, their `trigger_type` must be the same. To
+declare that the private trigger provides hardware control for the associated
+LED classdev, set the `hw_control_trigger` string to the trigger's name. Since
+both the LED classdev and the private trigger are in the same LED driver, it's
+not necessary for them to coordinate via `hw_control_*` callbacks.
+
When the LED is in hw control, no software blink is possible and doing so
will effectively disable hw control.
diff --git a/drivers/leds/led-class.c b/drivers/leds/led-class.c
index ab61e41a00a3..2460fcf0c469 100644
--- a/drivers/leds/led-class.c
+++ b/drivers/leds/led-class.c
@@ -96,8 +96,30 @@ static const struct bin_attribute *const led_trigger_bin_attrs[] = {
&bin_attr_trigger,
NULL,
};
+
+static DEVICE_ATTR_RO(trigger_may_offload);
+static struct attribute *led_trigger_attrs[] = {
+ &dev_attr_trigger_may_offload.attr,
+ NULL
+};
+
+static umode_t led_trigger_is_visible(struct kobject *kobj,
+ struct attribute *attr,
+ int idx)
+{
+ struct device *dev = kobj_to_dev(kobj);
+ struct led_classdev *led_cdev = dev_get_drvdata(dev);
+
+ if (attr == &dev_attr_trigger_may_offload.attr)
+ return led_cdev->hw_control_trigger ? attr->mode : 0;
+
+ return attr->mode;
+}
+
static const struct attribute_group led_trigger_group = {
.bin_attrs = led_trigger_bin_attrs,
+ .attrs = led_trigger_attrs,
+ .is_visible = led_trigger_is_visible,
};
#endif
diff --git a/drivers/leds/led-triggers.c b/drivers/leds/led-triggers.c
index 804a04b326c4..c3c41ef40f01 100644
--- a/drivers/leds/led-triggers.c
+++ b/drivers/leds/led-triggers.c
@@ -42,6 +42,9 @@ static bool __led_trigger_is_hw_controlled(struct led_classdev *led_cdev)
if (!led_cdev->trigger)
return false;
+ if (led_cdev->trigger->offloaded)
+ return led_cdev->trigger->offloaded(led_cdev);
+
return led_cdev->trigger->trigger_type;
}
@@ -341,6 +344,32 @@ void led_trigger_set_default(struct led_classdev *led_cdev)
}
EXPORT_SYMBOL_GPL(led_trigger_set_default);
+ssize_t trigger_may_offload_show(struct device *dev,
+ struct device_attribute *attr, char *buf)
+{
+ struct led_classdev *led_cdev = dev_get_drvdata(dev);
+ struct led_trigger *trig;
+ bool hit, offloaded;
+ int len;
+
+ guard(mutex)(&led_cdev->led_access);
+ guard(rwsem_read)(&led_cdev->trigger_lock);
+
+ trig = led_cdev->trigger;
+
+ offloaded = __led_trigger_is_hw_controlled(led_cdev);
+ hit = offloaded || (trig && !strcmp(led_cdev->hw_control_trigger, trig->name));
+
+ /* [offloaded] <active_but_not_offloaded> inactive */
+ len = sysfs_emit(buf, "%s%s%s\n",
+ offloaded ? "[" : (hit ? "<" : ""),
+ led_cdev->hw_control_trigger,
+ offloaded ? "]" : (hit ? ">" : ""));
+
+ return len;
+}
+EXPORT_SYMBOL_GPL(trigger_may_offload_show);
+
/* LED Trigger Interface */
int led_trigger_register(struct led_trigger *trig)
diff --git a/drivers/leds/leds.h b/drivers/leds/leds.h
index bee46651e068..b08a289397e4 100644
--- a/drivers/leds/leds.h
+++ b/drivers/leds/leds.h
@@ -27,6 +27,8 @@ ssize_t led_trigger_read(struct file *filp, struct kobject *kobj,
ssize_t led_trigger_write(struct file *filp, struct kobject *kobj,
const struct bin_attribute *bin_attr, char *buf,
loff_t pos, size_t count);
+ssize_t trigger_may_offload_show(struct device *dev,
+ struct device_attribute *attr, char *buf);
extern struct rw_semaphore leds_list_lock;
extern struct list_head leds_list;
diff --git a/include/linux/leds.h b/include/linux/leds.h
index d7d3dd905432..cc664da33e94 100644
--- a/include/linux/leds.h
+++ b/include/linux/leds.h
@@ -485,6 +485,7 @@ struct led_trigger {
const char *name;
int (*activate)(struct led_classdev *led_cdev);
void (*deactivate)(struct led_classdev *led_cdev);
+ bool (*offloaded)(struct led_classdev *led_cdev);
/* Brightness set by led_trigger_event */
enum led_brightness brightness;
--
2.53.0
^ permalink raw reply related
* [PATCH RFC v3 04/11] leds: cros_ec: trigger: Implement offloaded() callback
From: Rong Zhang @ 2026-07-18 17:05 UTC (permalink / raw)
To: Lee Jones, Pavel Machek, Jonathan Corbet, Shuah Khan,
Thomas Weißschuh, Benson Leung, Guenter Roeck,
Marek Behún, Mark Pearson, Derek J. Clark, Hans de Goede,
Ilpo Järvinen, Ike Panhc
Cc: Andrew Lunn, Jakub Kicinski, Vishnu Sankar, Vishnu Sankar,
linux-leds, netdev, linux-doc, linux-kernel, chrome-platform,
platform-driver-x86, Rong Zhang
In-Reply-To: <20260719-leds-trigger-hw-changed-v3-0-5fb55722e36e@rong.moe>
"chromeos-auto" is a private hardware control trigger which always stays
in hardware control. Implement offloaded() callback with its return
value to be always true to reflect this.
Reviewed-by: Thomas Weißschuh <linux@weissschuh.net>
Signed-off-by: Rong Zhang <i@rong.moe>
---
drivers/leds/leds-cros_ec.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/leds/leds-cros_ec.c b/drivers/leds/leds-cros_ec.c
index 1844d0cd5f52..6db83d015277 100644
--- a/drivers/leds/leds-cros_ec.c
+++ b/drivers/leds/leds-cros_ec.c
@@ -85,12 +85,18 @@ static int cros_ec_led_trigger_activate(struct led_classdev *led_cdev)
return cros_ec_led_send_cmd(priv->cros_ec, &arg);
}
+static bool cros_ec_led_trigger_offloaded(struct led_classdev *led_cdev)
+{
+ return true;
+}
+
static struct led_hw_trigger_type cros_ec_led_trigger_type;
static struct led_trigger cros_ec_led_trigger = {
.name = "chromeos-auto",
.trigger_type = &cros_ec_led_trigger_type,
.activate = cros_ec_led_trigger_activate,
+ .offloaded = cros_ec_led_trigger_offloaded,
};
static int cros_ec_led_brightness_set_blocking(struct led_classdev *led_cdev,
--
2.53.0
^ permalink raw reply related
* [PATCH RFC v3 05/11] leds: turris-omnia: trigger: Implement offloaded() and declare hw_control_trigger
From: Rong Zhang @ 2026-07-18 17:05 UTC (permalink / raw)
To: Lee Jones, Pavel Machek, Jonathan Corbet, Shuah Khan,
Thomas Weißschuh, Benson Leung, Guenter Roeck,
Marek Behún, Mark Pearson, Derek J. Clark, Hans de Goede,
Ilpo Järvinen, Ike Panhc
Cc: Andrew Lunn, Jakub Kicinski, Vishnu Sankar, Vishnu Sankar,
linux-leds, netdev, linux-doc, linux-kernel, chrome-platform,
platform-driver-x86, Rong Zhang
In-Reply-To: <20260719-leds-trigger-hw-changed-v3-0-5fb55722e36e@rong.moe>
"omnia-mcu" is a private hardware control trigger which always stays in
hardware control mode. Implement offloaded() callback with its return
value to be always true to reflect this.
Meanwhile, declare it as a hardware control trigger as it's forgotten
before.
Signed-off-by: Rong Zhang <i@rong.moe>
---
drivers/leds/leds-turris-omnia.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/leds/leds-turris-omnia.c b/drivers/leds/leds-turris-omnia.c
index ed6a47bbb44f..32d40d176d3f 100644
--- a/drivers/leds/leds-turris-omnia.c
+++ b/drivers/leds/leds-turris-omnia.c
@@ -195,10 +195,16 @@ static void omnia_hwtrig_deactivate(struct led_classdev *cdev)
err);
}
+static bool omnia_hwtrig_offloaded(struct led_classdev *cdev)
+{
+ return true;
+}
+
static struct led_trigger omnia_hw_trigger = {
.name = "omnia-mcu",
.activate = omnia_hwtrig_activate,
.deactivate = omnia_hwtrig_deactivate,
+ .offloaded = omnia_hwtrig_offloaded,
.trigger_type = &omnia_hw_trigger_type,
};
@@ -251,6 +257,7 @@ static int omnia_led_register(struct i2c_client *client, struct omnia_led *led,
* by LED class from the linux,default-trigger property.
*/
cdev->default_trigger = omnia_hw_trigger.name;
+ cdev->hw_control_trigger = omnia_hw_trigger.name;
/* Put the LED into software mode */
ret = omnia_cmd_write_u8(client, OMNIA_CMD_LED_MODE, OMNIA_CMD_LED_MODE_LED(led->reg) |
--
2.53.0
^ permalink raw reply related
* [PATCH RFC v3 06/11] leds: trigger: netdev: Implement offloaded() callback
From: Rong Zhang @ 2026-07-18 17:05 UTC (permalink / raw)
To: Lee Jones, Pavel Machek, Jonathan Corbet, Shuah Khan,
Thomas Weißschuh, Benson Leung, Guenter Roeck,
Marek Behún, Mark Pearson, Derek J. Clark, Hans de Goede,
Ilpo Järvinen, Ike Panhc
Cc: Andrew Lunn, Jakub Kicinski, Vishnu Sankar, Vishnu Sankar,
linux-leds, netdev, linux-doc, linux-kernel, chrome-platform,
platform-driver-x86, Rong Zhang
In-Reply-To: <20260719-leds-trigger-hw-changed-v3-0-5fb55722e36e@rong.moe>
"netdev" can run in hardware control according to hardware capabilities
and trigger options.
Implement offloaded() callback to provide its hardware control state to
the LED core, and document the relation between the custom "offloaded"
attribute and the generic "trigger_may_offload" attribute.
Signed-off-by: Rong Zhang <i@rong.moe>
---
Changes in v3:
- Do not deprecate netdev's "offloaded" attribute (thanks Thomas
Weißschuh)
- Document the relation between the custom "offloaded" attribute and the
generic "trigger_may_offload" attribute (ditto)
---
Documentation/ABI/testing/sysfs-class-led | 3 +++
Documentation/ABI/testing/sysfs-class-led-trigger-netdev | 3 +++
drivers/leds/trigger/ledtrig-netdev.c | 8 ++++++++
3 files changed, 14 insertions(+)
diff --git a/Documentation/ABI/testing/sysfs-class-led b/Documentation/ABI/testing/sysfs-class-led
index b61fc2e71bd3..7dc95f7a3505 100644
--- a/Documentation/ABI/testing/sysfs-class-led
+++ b/Documentation/ABI/testing/sysfs-class-led
@@ -100,6 +100,9 @@ Description:
- `[foo_trigger]`: the trigger is selected and offloaded to
hardware.
+ The "netdev" trigger also provides a custom attribute to
+ indicate its state, see `/sys/class/leds/<led>/offloaded`.
+
What: /sys/class/leds/<led>/inverted
Date: January 2011
KernelVersion: 2.6.38
diff --git a/Documentation/ABI/testing/sysfs-class-led-trigger-netdev b/Documentation/ABI/testing/sysfs-class-led-trigger-netdev
index ed46b37ab8a2..a5146ea1e3e6 100644
--- a/Documentation/ABI/testing/sysfs-class-led-trigger-netdev
+++ b/Documentation/ABI/testing/sysfs-class-led-trigger-netdev
@@ -75,6 +75,9 @@ Description:
If 1, the LED blinking in requested mode is offloaded to
hardware.
+ LED trigger core also provides a generic attribute for this
+ purpose, see `/sys/class/leds/<led>/trigger_may_offload`.
+
What: /sys/class/leds/<led>/link_10
Date: Jun 2023
KernelVersion: 6.5
diff --git a/drivers/leds/trigger/ledtrig-netdev.c b/drivers/leds/trigger/ledtrig-netdev.c
index 64c078e997f2..a26109ca4b1c 100644
--- a/drivers/leds/trigger/ledtrig-netdev.c
+++ b/drivers/leds/trigger/ledtrig-netdev.c
@@ -754,10 +754,18 @@ static void netdev_trig_deactivate(struct led_classdev *led_cdev)
kfree(trigger_data);
}
+static bool netdev_trig_offloaded(struct led_classdev *led_cdev)
+{
+ struct led_netdev_data *trigger_data = led_get_trigger_data(led_cdev);
+
+ return trigger_data->hw_control;
+}
+
static struct led_trigger netdev_led_trigger = {
.name = "netdev",
.activate = netdev_trig_activate,
.deactivate = netdev_trig_deactivate,
+ .offloaded = netdev_trig_offloaded,
.groups = netdev_trig_groups,
};
--
2.53.0
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox