<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/net, branch v7.0.14</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v7.0.14</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v7.0.14'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2026-06-27T10:07:40+00:00</updated>
<entry>
<title>net: net_failover: Fix the deadlock in slave register</title>
<updated>2026-06-27T10:07:40+00:00</updated>
<author>
<name>Faicker Mo</name>
<email>faicker.mo@gmail.com</email>
</author>
<published>2026-05-11T14:05:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7ce4f09aab0abc94b29530fe3e9e6bf95f7a5b67'/>
<id>urn:sha1:7ce4f09aab0abc94b29530fe3e9e6bf95f7a5b67</id>
<content type='text'>
commit b84c5632c7b31f8910167075a8128cfb9e50fcfe upstream.

There is netdev_lock_ops() before the NETDEV_REGISTER notifier
in register_netdevice(), so use the non-locking functions
in net_failover_slave_register().
failover_slave_register() in failover_existing_slave_register() adds lock
and unlock ops too.

Call Trace:
 &lt;TASK&gt;
 __schedule+0x30d/0x7a0
 schedule+0x27/0x90
 schedule_preempt_disabled+0x15/0x30
 __mutex_lock.constprop.0+0x538/0x9e0
 __mutex_lock_slowpath+0x13/0x20
 mutex_lock+0x3b/0x50
 dev_set_mtu+0x40/0xe0
 net_failover_slave_register+0x24/0x280
 failover_slave_register+0x103/0x1b0
 failover_event+0x15e/0x210
 ? dropmon_net_event+0xac/0xe0
 notifier_call_chain+0x5e/0xe0
 raw_notifier_call_chain+0x16/0x30
 call_netdevice_notifiers_info+0x52/0xa0
 register_netdevice+0x5f4/0x7c0
 register_netdev+0x1e/0x40
 _mlx5e_probe+0xe2/0x370 [mlx5_core]
 mlx5e_probe+0x59/0x70 [mlx5_core]
 ? __pfx_mlx5e_probe+0x10/0x10 [mlx5_core]

Fixes: 4c975fd70002 ("net: hold instance lock during NETDEV_REGISTER/UP")
Signed-off-by: Faicker Mo &lt;faicker.mo@gmail.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>net: export netif_open for self_test usage</title>
<updated>2026-06-27T10:07:40+00:00</updated>
<author>
<name>Mike Marciniszyn (Meta)</name>
<email>mike.marciniszyn@gmail.com</email>
</author>
<published>2026-03-07T10:58:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fabf508294f75e1e2e7cc7a53c8bade9fdc45ff1'/>
<id>urn:sha1:fabf508294f75e1e2e7cc7a53c8bade9fdc45ff1</id>
<content type='text'>
commit 3fdd33697c2be9184668c89ba4f24a5ecbc8ec51 upstream.

dev_open() already is exported, but drivers which use the netdev
instance lock need to use netif_open() instead. netif_close() is
also already exported [1] so this completes the pairing.

This export is required for the following fbnic self tests to
avoid calling ndo_stop() and ndo_open() in favor of the
more appropriate netif_open() and netif_close() that notifies
any listeners that the interface went down to test and is now
coming back up.

Link: https://patch.msgid.link/20250309215851.2003708-1-sdf@fomichev.me [1]
Signed-off-by: Mike Marciniszyn (Meta) &lt;mike.marciniszyn@gmail.com&gt;
Link: https://patch.msgid.link/20260307105847.1438-2-mike.marciniszyn@gmail.com
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>rose: don't free fd-owned sockets when reaping in the heartbeat</title>
<updated>2026-06-27T10:07:40+00:00</updated>
<author>
<name>Bernard Pidoux</name>
<email>bernard.f6bvp@gmail.com</email>
</author>
<published>2026-05-31T13:41:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=69969796115a9d03941c05aa100fac899e28f13d'/>
<id>urn:sha1:69969796115a9d03941c05aa100fac899e28f13d</id>
<content type='text'>
commit 56576518920edd7b6c3479477d8d490fe2ebdaaa upstream.

The heartbeat reaps orphaned ROSE sockets after their bound device goes
down. A socket still attached to a struct socket (sk-&gt;sk_socket != NULL --
e.g. an incoming connection an fpad client has accepted and kept open) is
owned by that userspace fd: rose_release() frees it on close(). Freeing it
from the heartbeat left the fd dangling, so the eventual close() touched
freed memory -- slab-use-after-free in rose_release().

Reap only sockets with sk-&gt;sk_socket == NULL (unaccepted incoming
connections and post-close orphans). For an fd-owned socket whose device
went down, disconnect it and fall through to the switch so close() does
the teardown. Also release the neighbour reference held by orphaned
incoming sockets before tearing them down.

Signed-off-by: Bernard Pidoux &lt;bernard.f6bvp@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>rose: clear neighbour pointer in rose_kill_by_device()</title>
<updated>2026-06-27T10:07:40+00:00</updated>
<author>
<name>Bernard Pidoux</name>
<email>bernard.f6bvp@gmail.com</email>
</author>
<published>2026-05-31T13:41:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4507ce5fec5edd8d2c2d8106cc8e6be0f167793e'/>
<id>urn:sha1:4507ce5fec5edd8d2c2d8106cc8e6be0f167793e</id>
<content type='text'>
commit 606e42d195b467480d4d405f8814c48d1651a76a upstream.

rose_kill_by_device() drops the neighbour reference but leaves
rose-&gt;neighbour pointing at it, unlike every other rose_neigh_put() site
(see "rose: clear neighbour pointer after rose_neigh_put() in state
machines"). The heartbeat STATE_0 reaping path then puts the same
neighbour a second time, causing a rose_neigh refcount underflow and a
use-after-free.

Set rose-&gt;neighbour = NULL after the put, restoring the invariant.

Signed-off-by: Bernard Pidoux &lt;bernard.f6bvp@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>rose: drop CALL_REQUEST in loopback timer when device is not running</title>
<updated>2026-06-27T10:07:40+00:00</updated>
<author>
<name>Bernard Pidoux</name>
<email>bernard.f6bvp@gmail.com</email>
</author>
<published>2026-05-28T18:20:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e0fbbe60d2721ae38c3e5bb4d63c50c46d4b3f08'/>
<id>urn:sha1:e0fbbe60d2721ae38c3e5bb4d63c50c46d4b3f08</id>
<content type='text'>
commit cf5567a2652e44866eae8987dff4c1ea507680df upstream.

When ax25stop brings down rose0 while the loopback timer has pending
CALL_REQUEST frames, rose_loopback_timer() calls rose_dev_get() and
finds the device still registered (unregister_netdevice waits for
refs to drop), then calls rose_rx_call_request() which takes a
netdev_hold() for the new socket.

But NETDEV_DOWN fires only once: rose_kill_by_device() already ran
before this timer tick, so the new socket is never cleaned up.  The
stuck reference prevents unregister_netdevice from completing, and the
orphan socket's timers eventually fire on freed memory (KASAN
slab-use-after-free in __run_timers).

The kernel clears IFF_UP via dev_close() before sending NETDEV_DOWN,
so checking netif_running() after rose_dev_get() is sufficient: if the
device is no longer running, the CALL_REQUEST is silently dropped and
no socket is created.  This closes the race without touching the
module-exit path (which already stops the timer via loopback_stopping).

Tested: unregister_netdevice completes immediately after ax25stop with
active loopback connections; no ref_tracker warnings, no KASAN.

Signed-off-by: Bernard Pidoux &lt;bernard.f6bvp@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>rose: release netdev ref and destroy orphaned incoming sockets</title>
<updated>2026-06-27T10:07:40+00:00</updated>
<author>
<name>Bernard Pidoux</name>
<email>bernard.f6bvp@gmail.com</email>
</author>
<published>2026-05-28T17:38:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=570e76a3c25f2edd2f5c6c15649f45e5a56f9eb1'/>
<id>urn:sha1:570e76a3c25f2edd2f5c6c15649f45e5a56f9eb1</id>
<content type='text'>
commit df12be096302d2c947388acc25764456c7f18cc1 upstream.

Two related cleanup gaps left the module unremovable after a loopback
session:

1. rose_destroy_socket() did not release the device reference.  When
   an unaccepted incoming socket (created by rose_rx_call_request()) is
   destroyed via rose_heartbeat_expiry(), it is removed from rose_list
   before rose_kill_by_device() can find it, so the netdev_hold() taken
   in rose_rx_call_request() was never matched by netdev_put().  Add the
   release at the top of rose_destroy_socket() guarded by a NULL check
   so that rose_release() and rose_kill_by_device(), which already call
   netdev_put() and set device = NULL, are not affected.

2. rose_heartbeat_expiry() STATE_0 cleanup required TCP_LISTEN in
   addition to SOCK_DEAD.  Unaccepted incoming sockets are
   TCP_ESTABLISHED, so the condition was never true and those sockets
   lingered forever, holding the module use count above zero and
   blocking rmmod.  Drop the TCP_LISTEN restriction: any STATE_0 +
   SOCK_DEAD socket is orphaned and should be destroyed.

Together with the earlier rose_make_new() double-hold fix these three
patches allow clean rmmod after loopback sessions.

Signed-off-by: Bernard Pidoux &lt;bernard.f6bvp@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>rose: fix netdev double-hold in rose_make_new()</title>
<updated>2026-06-27T10:07:40+00:00</updated>
<author>
<name>Bernard Pidoux</name>
<email>bernard.f6bvp@gmail.com</email>
</author>
<published>2026-05-28T17:11:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4f9aa720a80f1a23b26a04d8bc9d403f96770d09'/>
<id>urn:sha1:4f9aa720a80f1a23b26a04d8bc9d403f96770d09</id>
<content type='text'>
commit b9fb21ceb4f0d043767a1eba60786ec84809033b upstream.

rose_make_new() copies orose-&gt;device from the listener socket and calls
netdev_hold(), storing the tracker in rose-&gt;dev_tracker.  The only
caller, rose_rx_call_request(), then overwrites both make_rose-&gt;device
and make_rose-&gt;dev_tracker with a fresh netdev_hold() for the actual
incoming-call device.

This orphans the tracker allocated by rose_make_new(): it remains in
the device's refcount_tracker list but no pointer exists to free it
via netdev_put().  The result is one spurious outstanding reference per
accepted CALL_REQUEST, visible at rmmod time as:

  ref_tracker: netdev@X has 2/2 users at
      rose_rx_call_request+0xba3/0x1d50 [rose]
      rose_loopback_timer+0x3eb/0x670 [rose]

The second entry is the orphaned tracker from rose_make_new(); the
first is the correctly-managed socket reference from rose_rx_call_request().

Fix: initialise rose-&gt;device to NULL in rose_make_new() and let
rose_rx_call_request() -- the sole caller -- assign the correct device
and take the sole netdev_hold() as it already does.

Signed-off-by: Bernard Pidoux &lt;bernard.f6bvp@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>rose: disconnect orphaned STATE_2 sockets when device is gone</title>
<updated>2026-06-27T10:07:40+00:00</updated>
<author>
<name>Bernard Pidoux</name>
<email>bernard.f6bvp@gmail.com</email>
</author>
<published>2026-05-28T15:38:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=35ed67c5f66dcfba53a184263bafc7c5bd542558'/>
<id>urn:sha1:35ed67c5f66dcfba53a184263bafc7c5bd542558</id>
<content type='text'>
commit d4f4cf9f09a3f5fafa8f09110a7c1b5d10f2f261 upstream.

When ax25stop brings down ROSE interfaces, sockets in ROSE_STATE_2
(awaiting CLEAR CONFIRM) whose device pointer is already NULL are not
reached by rose_kill_by_device() and wait for T3 (up to 180s) before
self-cleaning via rose_timer_expiry().  This keeps the rose module
usecount at 1, blocking rmmod for the full T3 duration.

In rose_heartbeat_expiry(), detect ROSE_STATE_2 sockets with no device,
cancel T3, release the neighbour reference, and call rose_disconnect()
+ sock_set_flag(SOCK_DESTROY).  The next heartbeat tick (&lt;=5s) then
destroys the socket via the existing ROSE_STATE_0/SOCK_DESTROY path,
allowing clean module unload within 10s instead of up to 180s.

Signed-off-by: Bernard Pidoux &lt;bernard.f6bvp@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>rose: set SOCK_DESTROY in rose_kill_by_device() for prompt cleanup</title>
<updated>2026-06-27T10:07:40+00:00</updated>
<author>
<name>Bernard Pidoux</name>
<email>bernard.f6bvp@gmail.com</email>
</author>
<published>2026-05-27T12:11:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=25982d734933184ef8c9a5d8c6ce782321e23324'/>
<id>urn:sha1:25982d734933184ef8c9a5d8c6ce782321e23324</id>
<content type='text'>
commit 741a4863ad570889c75f7a8e404567d8f3e46335 upstream.

When rose_kill_by_device() is called (via NETDEV_DOWN on module exit
or interface removal), it calls rose_disconnect() which transitions
sockets to ROSE_STATE_0 and sets SOCK_DEAD.  However,
rose_heartbeat_expiry() only calls rose_destroy_socket() at
ROSE_STATE_0 if SOCK_DESTROY is set -- the SOCK_DEAD path is reserved
for TCP_LISTEN sockets.  Without SOCK_DESTROY, orphaned sockets in
ROSE_STATE_2 (clearing) loop indefinitely in the heartbeat without
ever being freed, keeping the module use-count elevated and blocking
modprobe -r rose until the T1 timer (up to 200 s) expires.

Set SOCK_DESTROY immediately after rose_disconnect() so the heartbeat
destroys the socket at its next tick (within 5 s), allowing clean
module unload.

Signed-off-by: Bernard Pidoux &lt;bernard.f6bvp@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>rose: fix notifier unregistered too early in rose_exit()</title>
<updated>2026-06-27T10:07:39+00:00</updated>
<author>
<name>Bernard Pidoux</name>
<email>bernard.f6bvp@gmail.com</email>
</author>
<published>2026-05-26T13:57:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4e5848f3e04be9f427fa912a15cc54f032f059cd'/>
<id>urn:sha1:4e5848f3e04be9f427fa912a15cc54f032f059cd</id>
<content type='text'>
commit f71a8a1edc14dba746edde38adddd654ba202b4d upstream.

rose_exit() called unregister_netdevice_notifier() before the loop that
calls unregister_netdev() on each ROSE virtual device.  As a result,
the NETDEV_DOWN event fired by unregister_netdev() was never delivered
to rose_device_event(), so rose_kill_by_device() never ran.

Every socket whose rose-&gt;device pointed at a ROSE device therefore kept
its netdev_tracker entry live until free_netdev() destroyed the
ref_tracker_dir, at which point the kernel reported all of them as
leaked references (165 entries in a typical FPAC setup).  Worse, those
sockets retained stale device pointers and live timers that could fire
into freed module text after module unload, causing a silent system
freeze with no kernel panic logged.

Fix by moving unregister_netdevice_notifier() to after the device-
unregistration loop.  unregister_netdev() then delivers NETDEV_DOWN
while the notifier is still registered, rose_kill_by_device() runs for
each device, releases all netdev references held by open sockets, and
calls rose_disconnect() which stops the per-socket timers.

Signed-off-by: Bernard Pidoux &lt;bernard.f6bvp@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
