diff --git a/security/sandbox/linux/SandboxFilter.cpp b/security/sandbox/linux/SandboxFilter.cpp
--- a/security/sandbox/linux/SandboxFilter.cpp
+++ b/security/sandbox/linux/SandboxFilter.cpp
@@ -1920,17 +1920,17 @@
 
       case __NR_brk:
         return Allow();
       case __NR_sched_get_priority_min:
       case __NR_sched_get_priority_max:
+      case __NR_sched_setscheduler:
         return Allow();
       // The OpenH264 plugin needs sched_getaffinity() in multithreaded mode;
       // bug 2071378.
       case __NR_sched_getaffinity:
       case __NR_sched_getparam:
-      case __NR_sched_getscheduler:
-      case __NR_sched_setscheduler: {
+      case __NR_sched_getscheduler: {
         Arg<pid_t> pid(0);
         return If(pid == 0, Allow()).Else(Trap(SchedTrap, nullptr));
       }
 
       // For clock(3) on older glibcs; bug 1304220.
@@ -2233,16 +2233,18 @@
       case __NR_sched_getaffinity:
       case __NR_sched_setaffinity:
       case __NR_sched_getparam:
       case __NR_sched_setparam:
       case __NR_sched_getscheduler:
-      case __NR_sched_setscheduler:
       case __NR_sched_getattr:
       case __NR_sched_setattr: {
         Arg<pid_t> pid(0);
         return If(pid == 0, Allow()).Else(Trap(SchedTrap, nullptr));
       }
+      // sched_setscheduler gets special treatment here (bug 1657849):
+      case __NR_sched_setscheduler:
+        return Allow();
 
         // The priority bounds are also used, sometimes (bug 1838675):
       case __NR_sched_get_priority_min:
       case __NR_sched_get_priority_max:
         return Allow();

