aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2020-05-28 13:03:02 +0200
committerJo-Philipp Wich <jo@mein.io>2020-05-28 13:08:51 +0200
commit31de4a40e758f384e89b592806a64130833cac35 (patch)
tree34881e86521a186d20a14c6eba36d1ab59ab200f
parent83b714a27ff3f3a394dfb1c8f6f05467a093a91a (diff)
downloadupstream-31de4a40e758f384e89b592806a64130833cac35.tar.gz
upstream-31de4a40e758f384e89b592806a64130833cac35.tar.bz2
upstream-31de4a40e758f384e89b592806a64130833cac35.zip
broadcom-wl: don't inherit lock descriptor in nas process
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> (cherry picked from commit a03d6d2fab13c478a0f6cfc3082bec141f2adcf1)
-rw-r--r--package/kernel/broadcom-wl/Makefile2
-rw-r--r--package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh5
2 files changed, 5 insertions, 2 deletions
diff --git a/package/kernel/broadcom-wl/Makefile b/package/kernel/broadcom-wl/Makefile
index 140107df17..2a853ded36 100644
--- a/package/kernel/broadcom-wl/Makefile
+++ b/package/kernel/broadcom-wl/Makefile
@@ -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
diff --git a/package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh b/package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh
index 3643f6b1c6..33447341b2 100644
--- a/package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh
+++ b/package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh
@@ -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>&-"
}