broadcom-wl: don't inherit lock descriptor in nas process
authorJo-Philipp Wich <jo@mein.io>
Thu, 28 May 2020 11:03:02 +0000 (13:03 +0200)
committerJo-Philipp Wich <jo@mein.io>
Thu, 28 May 2020 11:08:14 +0000 (13:08 +0200)
Add a local hack to prevent the Broadcom WPA authenticator process from
inheriting the lock descriptor 1000 used to prevent concurrent executions
of the init script.

Without this fix, repeated invocations of /etc/init.d/network, e.g. for
obtaining the enabled state, would hang forever.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
package/kernel/broadcom-wl/Makefile
package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh

index a3d7b5f1bb16c0677622319e08a12413a5355e77..1ed5012b884661cc31d968e9cdc34c655b632ff6 100644 (file)
@@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=broadcom-wl
 PKG_VERSION:=5.10.56.27.3
-PKG_RELEASE:=8
+PKG_RELEASE:=9
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(ARCH).tar.bz2
 PKG_SOURCE_URL:=http://downloads.openwrt.org/sources
index 3643f6b1c6c41e4a60d1eeaa1304b928f487113e..33447341b259ba0493b1efe120a02988ce6b3dba 100644 (file)
@@ -443,7 +443,10 @@ EOF
        txpower=${txpower:-$vif_txpower}
        [ -z "$txpower" ] || iwconfig $device txpower ${txpower}dBm
 
-       eval "$nas_cmd"
+       # fd 1000 is an inherited lock file descriptor for preventing concurrent
+       # init script executions. Close it here to prevent the nas daemon from
+       # inheriting it further to avoid holding the lock indefinitely.
+       eval "$nas_cmd 1000>&-"
 }