Skip to content
Snippets Groups Projects
Commit 38f55cc0 authored by Zhu Ken's avatar Zhu Ken
Browse files

[rstp]fixes the linux hung when enable stp by command brctl


When user try to use linux command brctl stp br-lan on/off
to set up the stp, it will cause linux go hung.

This is because when rstp is not enabled, the commands brctl stp
br-lan on will avoke rstp, the rstp will call this command again,
and in this command, it use a lock, it cause deadlock, make the
kernel hung.

in this fixes, the command won't run the rstp again, so it won't
go into deadlock.

Change-Id: I4b7322f976ec00c8c65219a2be43a7173858b917
Signed-off-by: default avatarZhu Ken <guigenz@codeaurora.org>
parent a50cc734
No related tags found
No related merge requests found
diff -Nur a/bridge-stp rstp-2011-10-11/bridge-stp
--- a/bridge-stp 2015-09-11 15:07:22.317566056 -0700
+++ rstp-2011-10-11/bridge-stp 2015-09-11 16:17:16.365671676 -0700
@@ -50,12 +50,17 @@
daemon
}
+#when kernel start stp, we can't start the rstp again.
+#otherwise it will cause deadlock issue
+checkpid $pid_file || exit 1
+
case $2 in
start)
- daemon
- exec /sbin/rstpctl rstp $bridge on ;;
+ exec /sbin/rstpctl rstp $bridge on
+ ;;
stop)
- exec /sbin/rstpctl rstp $bridge off ;;
+ exec /sbin/rstpctl rstp $bridge off
+ ;;
*)
echo "Unknown action:" $2
echo "Usage: bridge-stp <bridge> {start|stop}"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment