<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/git/stable/linux.git/net/batman-adv/hard-interface.c, branch master</title>
<subtitle>Linux kernel stable tree</subtitle>
<id>https://git.landau.one/pub/scm/linux/kernel/git/stable/linux.git/atom?h=master</id>
<link rel='self' href='https://git.landau.one/pub/scm/linux/kernel/git/stable/linux.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/stable/linux.git/'/>
<updated>2026-09-05T04:37:00+00:00</updated>
<entry>
<title>treewide: refresh kmalloc_obj() conversions</title>
<updated>2026-09-05T04:37:00+00:00</updated>
<author>
<name>Kees Cook</name>
<email>kees+treewide@kernel.org</email>
</author>
<published>2026-09-02T22:31:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=3a2c4d55e32ad65efebdb6de44eef3bfa08bb49d'/>
<id>urn:sha1:3a2c4d55e32ad65efebdb6de44eef3bfa08bb49d</id>
<content type='text'>
This is another run of the Coccinelle script for converting kmalloc()
family of allocations to kmalloc_obj() via the existing rules in
scripts/coccinelle/api/kmalloc_objs.cocci

This catches both the set of kmalloc() uses added since the first
kmalloc_obj() conversions in v7.0 and adds a large group missed in the
first pass due to Coccinelle not interacting well with the cleanup.h
scoped_...() family of macros[1]. I worked around this with spatch's
"--macro-file" argument to a file with all the scoped_...() macros mapped
to Coccinelle's YACFE_ITERATOR[2] as that was the closest viable control
flow indicator I could find.

Build tested allmodconfig on x86, arm64, arm, loongarch, mips, powerpc,
riscv, and s390 with no new warnings.

Link: https://lore.kernel.org/lkml/202609021314.8A9C0B8@keescook/ [1]
Link: https://github.com/coccinelle/coccinelle/blob/master/standard.h [2]
Signed-off-by: Kees Cook &lt;kees+treewide@kernel.org&gt;
</content>
</entry>
<entry>
<title>batman-adv: switch var declarations to reverse x-mas tree order</title>
<updated>2026-08-04T15:33:05+00:00</updated>
<author>
<name>Sven Eckelmann</name>
<email>sven@narfation.org</email>
</author>
<published>2026-06-08T11:39:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=4549e49abbced072eefa1238b5a73ce093551ac9'/>
<id>urn:sha1:4549e49abbced072eefa1238b5a73ce093551ac9</id>
<content type='text'>
The network related code should use for local variable declarations an
ordering scheme which orders lines longest to shortest. Initializations
should only be kept in the declarations when the dependencies between them
are not preventing the reverse x-mas tree order.

Many functions are already using this order. The remaining ones were
supposed to slowly convert to the x-mas tree order when working on them.
But this never happened because the patches tried to only modify the
relevant lines. Instead of getting better, the order often just became
worse.

Just fix the remaining offending functions to finally solve this coding
style (minor) problem. The anonymous dhcp structs were only extracted to
have a clean reverse x-mas tree in functions and are not yet meant as an
opportunity for further cleanups.

Signed-off-by: Sven Eckelmann &lt;sven@narfation.org&gt;
</content>
</entry>
<entry>
<title>batman-adv: add missing kernel-doc comments</title>
<updated>2026-08-04T15:33:04+00:00</updated>
<author>
<name>Sven Eckelmann</name>
<email>sven@narfation.org</email>
</author>
<published>2026-06-08T07:56:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=3ebcaccc8871ba723ea336db9da9084ae3cffcb3'/>
<id>urn:sha1:3ebcaccc8871ba723ea336db9da9084ae3cffcb3</id>
<content type='text'>
batman-adv requires kernel-doc for all functions and data types visible
outside their own translation unit. Promoting a function from static to
module-wide visibility currently requires adding documentation from
scratch. However, this burden falls on whoever promotes a function from
static to module-wide visibility, rather than its original implementer.

Add the missing kernel-doc comments for the remaining undocumented
functions and data types to reduce the complexity for new contributions.

Signed-off-by: Sven Eckelmann &lt;sven@narfation.org&gt;
</content>
</entry>
<entry>
<title>batman-adv: drop NULL check for immutable hardif-&gt;mesh_iface</title>
<updated>2026-06-28T19:58:36+00:00</updated>
<author>
<name>Sven Eckelmann</name>
<email>sven@narfation.org</email>
</author>
<published>2026-06-04T06:30:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=b58c36b804f4447655a9eb353bf3a9d310f50e06'/>
<id>urn:sha1:b58c36b804f4447655a9eb353bf3a9d310f50e06</id>
<content type='text'>
The batadv_hard_iface-&gt;mesh_iface became immutable after the global
batadv_hardif_list was removed and batadv_hard_iface only exists when it is
assigned to an mesh_iface. This member can never become NULL and thus a
check is now unnecessary.

Signed-off-by: Sven Eckelmann &lt;sven@narfation.org&gt;
</content>
</entry>
<entry>
<title>batman-adv: drop unneeded goto and initialization from batadv_hardif_disable_interface()</title>
<updated>2026-06-28T19:45:29+00:00</updated>
<author>
<name>Nora Schiffer</name>
<email>neocturne@universe-factory.net</email>
</author>
<published>2026-06-28T15:07:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=2b429dbc50b43db1d85429d5bab0498bc4906736'/>
<id>urn:sha1:2b429dbc50b43db1d85429d5bab0498bc4906736</id>
<content type='text'>
The only use of the label was too early for primary_if to be set
anyways.

Also move the put of primary_if further up to hold the reference only as
long as necessary, hopefully avoiding the need to re-introduce the goto
label with future code changes.

Signed-off-by: Nora Schiffer &lt;neocturne@universe-factory.net&gt;
Signed-off-by: Sven Eckelmann &lt;sven@narfation.org&gt;
</content>
</entry>
<entry>
<title>batman-adv: move hardif generation counter into batadv_priv</title>
<updated>2026-06-28T19:45:28+00:00</updated>
<author>
<name>Nora Schiffer</name>
<email>neocturne@universe-factory.net</email>
</author>
<published>2026-06-28T15:07:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=cbda6a6cf2a5abe0dda94819f4e1aaba40678913'/>
<id>urn:sha1:cbda6a6cf2a5abe0dda94819f4e1aaba40678913</id>
<content type='text'>
The counter doesn't need to be global.

Signed-off-by: Nora Schiffer &lt;neocturne@universe-factory.net&gt;
Signed-off-by: Sven Eckelmann &lt;sven@narfation.org&gt;
</content>
</entry>
<entry>
<title>batman-adv: remove BATADV_IF_NOT_IN_USE hardif state</title>
<updated>2026-06-28T19:45:28+00:00</updated>
<author>
<name>Nora Schiffer</name>
<email>neocturne@universe-factory.net</email>
</author>
<published>2026-06-28T15:07:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=48ea7b6b7b9474d8c350b1180f49a210d972f99c'/>
<id>urn:sha1:48ea7b6b7b9474d8c350b1180f49a210d972f99c</id>
<content type='text'>
With hardifs only existing while an interface is part of a mesh, the
BATADV_IF_NOT_IN_USE state has become redundant.

Signed-off-by: Nora Schiffer &lt;neocturne@universe-factory.net&gt;
Signed-off-by: Sven Eckelmann &lt;sven@narfation.org&gt;
</content>
</entry>
<entry>
<title>batman-adv: make hard_iface-&gt;mesh_iface immutable</title>
<updated>2026-06-28T19:45:28+00:00</updated>
<author>
<name>Sven Eckelmann</name>
<email>sven@narfation.org</email>
</author>
<published>2026-06-28T15:07:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=f846e779532ea99dea34005c1cfbb4820b582d1e'/>
<id>urn:sha1:f846e779532ea99dea34005c1cfbb4820b582d1e</id>
<content type='text'>
With the hard_iface now being created for a specific mesh_iface, it is
beneficial not to set mesh_iface to NULL when the interface is disabled,
but instead keeping it immutable after the initial setup of the
hard_iface. By also holding the reference to the mesh_iface until the
hard_iface is released, hard_ifaces iterated over under RCU will always
point to a valid mesh_iface.

Co-developed-by: Nora Schiffer &lt;neocturne@universe-factory.net&gt;
Signed-off-by: Nora Schiffer &lt;neocturne@universe-factory.net&gt;
Signed-off-by: Sven Eckelmann &lt;sven@narfation.org&gt;
</content>
</entry>
<entry>
<title>batman-adv: remove global hardif list</title>
<updated>2026-06-28T19:45:28+00:00</updated>
<author>
<name>Nora Schiffer</name>
<email>neocturne@universe-factory.net</email>
</author>
<published>2026-06-28T15:07:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=49e9de6e124fe80da68dfe9e7fe4e0b1ddfc4b35'/>
<id>urn:sha1:49e9de6e124fe80da68dfe9e7fe4e0b1ddfc4b35</id>
<content type='text'>
With interfaces being kept track of as iflink private data, there is no
need for the global list anymore. batadv_hardif_get_by_netdev() can now
use netdev_master_upper_dev_get()+netdev_lower_dev_get_private() to find
the hardif corresponding to a netdev.

Signed-off-by: Nora Schiffer &lt;neocturne@universe-factory.net&gt;
Signed-off-by: Sven Eckelmann &lt;sven@narfation.org&gt;
</content>
</entry>
<entry>
<title>batman-adv: create hardif only for netdevs that are part of a mesh</title>
<updated>2026-06-28T19:45:28+00:00</updated>
<author>
<name>Nora Schiffer</name>
<email>neocturne@universe-factory.net</email>
</author>
<published>2026-06-28T15:07:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=fcba102e0e4a3d39316ca9286b5619f161da4baa'/>
<id>urn:sha1:fcba102e0e4a3d39316ca9286b5619f161da4baa</id>
<content type='text'>
batman-adv is using netdev notifiers to create a hard_iface struct for
every Ethernet-like netdev in the system. These hardifs are tracked in a
global linked list, which results in a few performance issues:

Lookups in this list are O(n) in the total number of netdevs. As a
hardif is looked up when a netdev is removed, this also takes O(n) in
the number of netdevs, and removing n netdevs may take O(n^2). This
slowdown will always happen when the batman-adv module is loaded, no
mesh needs to be active.

With the hardif being referenced as iflink private data, the global list
is only needed for hardifs that are *not* part of a mesh (that is, the
hardif is unused). To prepare for removing the global list, only create
a hardif struct when an interface is added to a mesh and destroy it on
removal.

As adding/removing and enabling/disabling a hardif become one and the
same, batadv_hardif_add_interface() is merged into
batadv_hardif_enable_interface(), and batadv_hardif_remove_interface()
can be dropped altogether.

Signed-off-by: Nora Schiffer &lt;neocturne@universe-factory.net&gt;
Signed-off-by: Sven Eckelmann &lt;sven@narfation.org&gt;
</content>
</entry>
</feed>
