[patch 1/2] cyclictest: fix priviledge test

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Switching back to SCHED_OTHER in check_priv() fails due to the param
argument of sched_setscheduler() set to NULL.

Set the priority to 0 and hand in params.

Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
---
 src/cyclictest/cyclictest.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Index: rt-tests/src/cyclictest/cyclictest.c
===================================================================
--- rt-tests.orig/src/cyclictest/cyclictest.c
+++ rt-tests/src/cyclictest/cyclictest.c
@@ -955,7 +955,8 @@ check_privs(void)
 	}
 
 	/* we're good; change back and return success */
-	sched_setscheduler(0, policy, NULL);
+	param.sched_priority = 0;
+	sched_setscheduler(0, policy, &param);
 	return 0;
 }
 


--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux