Skip to content
Commit 6a9e261c authored by Paul Moore's avatar Paul Moore
Browse files

selinux: don't sleep when CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE is true



Unfortunately commit 81200b02 ("selinux: checkreqprot is
deprecated, add some ssleep() discomfort") added a five second sleep
during early kernel boot, e.g. start_kernel(), which could cause a
"scheduling while atomic" panic.  This patch fixes this problem by
moving the sleep out of checkreqprot_set() and into
sel_write_checkreqprot() so that we only sleep when the checkreqprot
setting is set during runtime, after the kernel has booted.  The
error message remains the same in both cases.

Fixes: 81200b02 ("selinux: checkreqprot is deprecated, add some ssleep() discomfort")
Reported-by: default avatarJ. Bruce Fields <bfields@fieldses.org>
Signed-off-by: default avatarPaul Moore <paul@paul-moore.com>
parent 81200b02
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment