kernel: Add a patch to remove checks for bridge stp helpers

This commit is contained in:
William A. Kennington III 2015-01-13 15:23:50 -08:00
parent ca1116d297
commit f64c3ce18d
3 changed files with 71 additions and 8 deletions

View file

@ -0,0 +1,50 @@
diff --git a/net/bridge/br_stp_if.c b/net/bridge/br_stp_if.c
index 4114687..49832c0 100644
--- a/net/bridge/br_stp_if.c
+++ b/net/bridge/br_stp_if.c
@@ -124,12 +124,6 @@ void br_stp_disable_port(struct net_bridge_port *p)
static void br_stp_start(struct net_bridge *br)
{
- int r;
- char *argv[] = { BR_STP_PROG, br->dev->name, "start", NULL };
- char *envp[] = { NULL };
-
- r = call_usermodehelper(BR_STP_PROG, argv, envp, UMH_WAIT_PROC);
-
spin_lock_bh(&br->lock);
if (br->bridge_forward_delay < BR_MIN_FORWARD_DELAY)
@@ -137,29 +131,16 @@ static void br_stp_start(struct net_bridge *br)
else if (br->bridge_forward_delay > BR_MAX_FORWARD_DELAY)
__br_set_forward_delay(br, BR_MAX_FORWARD_DELAY);
- if (r == 0) {
- br->stp_enabled = BR_USER_STP;
- br_debug(br, "userspace STP started\n");
- } else {
- br->stp_enabled = BR_KERNEL_STP;
- br_debug(br, "using kernel STP\n");
-
- /* To start timers on any ports left in blocking */
- br_port_state_selection(br);
- }
+ br->stp_enabled = BR_USER_STP;
+ br_debug(br, "userspace STP started\n");
spin_unlock_bh(&br->lock);
}
static void br_stp_stop(struct net_bridge *br)
{
- int r;
- char *argv[] = { BR_STP_PROG, br->dev->name, "stop", NULL };
- char *envp[] = { NULL };
-
if (br->stp_enabled == BR_USER_STP) {
- r = call_usermodehelper(BR_STP_PROG, argv, envp, UMH_WAIT_PROC);
- br_info(br, "userspace STP stopped, return code %d\n", r);
+ br_info(br, "userspace STP stoppe\n");
/* To start timers on any ports left in blocking */
spin_lock_bh(&br->lock);

View file

@ -32,6 +32,11 @@ in
rec {
dont_require_bridge_helper =
{ name = "dont-require-bridge-helper";
patch = ./dont-require-bridge-helper.patch;
};
no_xsave =
{ name = "no-xsave";
patch = ./no-xsave.patch;

View file

@ -8395,12 +8395,13 @@ let
linux_3_2 = makeOverridable (import ../os-specific/linux/kernel/linux-3.2.nix) {
inherit fetchurl stdenv perl buildLinux;
kernelPatches = [];
kernelPatches = [ kernelPatches.dont_require_bridge_helper ];
};
linux_3_4 = makeOverridable (import ../os-specific/linux/kernel/linux-3.4.nix) {
inherit fetchurl stdenv perl buildLinux;
kernelPatches = lib.optionals ((platform.kernelArch or null) == "mips")
kernelPatches = [ kernelPatches.dont_require_bridge_helper ]
++ lib.optionals ((platform.kernelArch or null) == "mips")
[ kernelPatches.mips_fpureg_emu
kernelPatches.mips_fpu_sigill
];
@ -8408,11 +8409,13 @@ let
linux_3_6_rpi = makeOverridable (import ../os-specific/linux/kernel/linux-rpi-3.6.nix) {
inherit fetchurl stdenv perl buildLinux;
kernelPatches = [ kernelPatches.dont_require_bridge_helper ];
};
linux_3_10 = makeOverridable (import ../os-specific/linux/kernel/linux-3.10.nix) {
inherit fetchurl stdenv perl buildLinux;
kernelPatches = lib.optionals ((platform.kernelArch or null) == "mips")
kernelPatches = [ kernelPatches.dont_require_bridge_helper ]
++ lib.optionals ((platform.kernelArch or null) == "mips")
[ kernelPatches.mips_fpureg_emu
kernelPatches.mips_fpu_sigill
kernelPatches.mips_ext3_n32
@ -8421,7 +8424,8 @@ let
linux_3_12 = makeOverridable (import ../os-specific/linux/kernel/linux-3.12.nix) {
inherit fetchurl stdenv perl buildLinux;
kernelPatches = lib.optionals ((platform.kernelArch or null) == "mips")
kernelPatches = [ kernelPatches.dont_require_bridge_helper ]
++ lib.optionals ((platform.kernelArch or null) == "mips")
[ kernelPatches.mips_fpureg_emu
kernelPatches.mips_fpu_sigill
kernelPatches.mips_ext3_n32
@ -8430,7 +8434,8 @@ let
linux_3_14 = makeOverridable (import ../os-specific/linux/kernel/linux-3.14.nix) {
inherit fetchurl stdenv perl buildLinux;
kernelPatches = lib.optionals ((platform.kernelArch or null) == "mips")
kernelPatches = [ kernelPatches.dont_require_bridge_helper ]
++ lib.optionals ((platform.kernelArch or null) == "mips")
[ kernelPatches.mips_fpureg_emu
kernelPatches.mips_fpu_sigill
kernelPatches.mips_ext3_n32
@ -8439,7 +8444,8 @@ let
linux_3_17 = makeOverridable (import ../os-specific/linux/kernel/linux-3.17.nix) {
inherit fetchurl stdenv perl buildLinux;
kernelPatches = lib.optionals ((platform.kernelArch or null) == "mips")
kernelPatches = [ kernelPatches.dont_require_bridge_helper ]
++ lib.optionals ((platform.kernelArch or null) == "mips")
[ kernelPatches.mips_fpureg_emu
kernelPatches.mips_fpu_sigill
kernelPatches.mips_ext3_n32
@ -8448,7 +8454,8 @@ let
linux_3_18 = makeOverridable (import ../os-specific/linux/kernel/linux-3.18.nix) {
inherit fetchurl stdenv perl buildLinux;
kernelPatches = lib.optionals ((platform.kernelArch or null) == "mips")
kernelPatches = [ kernelPatches.dont_require_bridge_helper ]
++ lib.optionals ((platform.kernelArch or null) == "mips")
[ kernelPatches.mips_fpureg_emu
kernelPatches.mips_fpu_sigill
kernelPatches.mips_ext3_n32
@ -8457,7 +8464,8 @@ let
linux_testing = makeOverridable (import ../os-specific/linux/kernel/linux-testing.nix) {
inherit fetchurl stdenv perl buildLinux;
kernelPatches = lib.optionals ((platform.kernelArch or null) == "mips")
kernelPatches = [ kernelPatches.dont_require_bridge_helper ]
++ lib.optionals ((platform.kernelArch or null) == "mips")
[ kernelPatches.mips_fpureg_emu
kernelPatches.mips_fpu_sigill
kernelPatches.mips_ext3_n32