]> git.ipfire.org Git - thirdparty/openwrt.git/commit
generic: backport net-dsa-realtek use devm_mutex_init for locks 24486/head
authorMieczyslaw Nalewaj <namiltd@yahoo.com>
Thu, 30 Jul 2026 07:07:58 +0000 (09:07 +0200)
committerJonas Jelonek <jelonek.jonas@gmail.com>
Sun, 2 Aug 2026 16:44:29 +0000 (18:44 +0200)
commit0f37dbbe6af9a4fbadfcb6712abdae27ce28b755
tree08e30ea851b43d702fef585de813ec8b8e68f6a6
parent6ca3332676506e5315d0881ca98cd07c76dfe68b
generic: backport net-dsa-realtek use devm_mutex_init for locks

Backport four upstream commits that convert mutex_init() calls to
devm_mutex_init() in the Realtek DSA driver family. With
CONFIG_DEBUG_MUTEXES enabled, mutex_destroy() must be called before a
mutex is discarded; using the devm variant handles this cleanup
automatically and avoids leaking a warning on driver removal/failure.

Added patches (applied to both backport-6.12 and backport-6.18):
- 944-01: net: dsa: realtek: rtl8365mb: use devm_mutex_init for mib_lock
- 944-02: net: dsa: realtek: use devm_mutex_init for regmap lock
- 944-03: net: dsa: realtek: use devm_mutex_init for vlan_lock
- 944-04: net: dsa: realtek: use devm_mutex_init for l2_lock

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/24486
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
target/linux/generic/backport-6.12/944-01-v7.2-net-dsa-realtek-rtl8365mb-use-devm_mutex_init-for-mib_lock.patch [new file with mode: 0644]
target/linux/generic/backport-6.12/944-02-v7.2-net-dsa-realtek-use-devm_mutex_init-for-regmap-lock.patch [new file with mode: 0644]
target/linux/generic/backport-6.12/944-03-v7.2-net-dsa-realtek-use-devm_mutex_init-for-vlan_lock.patch [new file with mode: 0644]
target/linux/generic/backport-6.12/944-04-v7.2-net-dsa-realtek-use-devm_mutex_init-for-l2_lock.patch [new file with mode: 0644]
target/linux/generic/backport-6.18/944-01-v7.2-net-dsa-realtek-rtl8365mb-use-devm_mutex_init-for-mib_lock.patch [new file with mode: 0644]
target/linux/generic/backport-6.18/944-02-v7.2-net-dsa-realtek-use-devm_mutex_init-for-regmap-lock.patch [new file with mode: 0644]
target/linux/generic/backport-6.18/944-03-v7.2-net-dsa-realtek-use-devm_mutex_init-for-vlan_lock.patch [new file with mode: 0644]
target/linux/generic/backport-6.18/944-04-v7.2-net-dsa-realtek-use-devm_mutex_init-for-l2_lock.patch [new file with mode: 0644]