瀏覽代碼

lantiq: Synchronize access to the DSL command pipe

Whenever two processes were executing different commands at the same
time then one of the commands sometimes got the response of the other
command.

Signed-off-by: Martin Blumenstingl <[email protected]>

SVN-Revision: 47213
John Crispin 10 年之前
父節點
當前提交
e1d585d99f
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh

+ 2 - 0
target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh

@@ -12,8 +12,10 @@ fi
 #
 dsl_cmd() {
 	killall -0 ${XDSL_CTRL} && (
+		lock /var/lock/dsl_pipe
 		echo "$@" > /tmp/pipe/dsl_cpe0_cmd
 		cat /tmp/pipe/dsl_cpe0_ack
+		lock -u /var/lock/dsl_pipe
 	)
 }
 dsl_val() {