allow insmod to set nice and scheduler
Camera sensor driver threads instantiated at module load need the
ability to set their scheduler to FIFO.
Test: ois-worker kthread is FIFO
Bug: 160883639
Change-Id: Ic8b5a5ca52a2d5b8e49a20450703ed0c1a409e8c
diff --git a/common/init-insmod-sh.te b/common/init-insmod-sh.te
index de1d408..16bc87c 100644
--- a/common/init-insmod-sh.te
+++ b/common/init-insmod-sh.te
@@ -8,6 +8,10 @@
allow init-insmod-sh vendor_kernel_modules:system module_load;
allow init-insmod-sh kernel:key search;
+# modprobe needs sys_nice and setsched for driver threads
+allow init-insmod-sh self:capability sys_nice;
+allow init-insmod-sh kernel:process setsched;
+
# modprobe need proc_modules
allow init-insmod-sh proc_modules:file r_file_perms;