From: Herbert Xu Date: Thu, 12 Sep 2013 07:12:05 +0000 (+1000) Subject: bridge: Clamp forward_delay when enabling STP X-Git-Tag: v3.12-rc2~14^2~51 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=be4f154d5ef0ca147ab6bcd38857a774133f5450;p=pandora-kernel.git bridge: Clamp forward_delay when enabling STP At some point limits were added to forward_delay. However, the limits are only enforced when STP is enabled. This created a scenario where you could have a value outside the allowed range while STP is disabled, which then stuck around even after STP is enabled. This patch fixes this by clamping the value when we enable STP. I had to move the locking around a bit to ensure that there is no window where someone could insert a value outside the range while we're in the middle of enabling STP. Signed-off-by: Herbert Xu Cheers, Signed-off-by: David S. Miller --- Reading git-diff-tree failed