The main thread should just INHERIT its scheduler attributes.
Explicitly setting SCHED_OTHER/0 was causing SELinux denials:
02-08 09:58:05.430 661 661 I auditd : type=1400 audit(0.0:20): avc: denied { sys_nice } for comm="grep" capability=23 scontext=u:r:init-qcom-devstart-sh:s0 tcontext=u:r:init-qcom-devstart-sh:s0 tclass=capability permissive=0
02-08 09:58:05.430 662 662 I auditd : type=1400 audit(0.0:21): avc: denied { sys_nice } for comm="sed" capability=23 scontext=u:r:init-qcom-devstart-sh:s0 tcontext=u:r:init-qcom-devstart-sh:s0 tclass=capability permissive=0
Also use public pthread API rather than modifying the main thread's
pthread_attr_t directly.
Bug: http://b/68328561
Test: strace -f -e true
Change-Id: I65b7ab3ce285a2901a6eaacb243000c780883c3a
Loading
Please sign in to comment