diff options
author | Paul Moore <paul@paul-moore.com> | 2022-04-14 16:40:10 -0400 |
---|---|---|
committer | Paul Moore <paul@paul-moore.com> | 2022-04-14 16:44:21 -0400 |
commit | 6a9e261cbbee08c499f2331910027e8c40c8f81f (patch) | |
tree | 9478231587f3a1750bf1a200c57997381f5e715e /drivers/ata/ahci_xgene.c | |
parent | 81200b0265b15609dcecf192e3f7fb238ec0d3da (diff) | |
download | linux-6a9e261cbbee08c499f2331910027e8c40c8f81f.tar.gz linux-6a9e261cbbee08c499f2331910027e8c40c8f81f.tar.bz2 linux-6a9e261cbbee08c499f2331910027e8c40c8f81f.zip |
selinux: don't sleep when CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE is true
Unfortunately commit 81200b0265b1 ("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: 81200b0265b1 ("selinux: checkreqprot is deprecated, add some ssleep() discomfort")
Reported-by: J. Bruce Fields <bfields@fieldses.org>
Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'drivers/ata/ahci_xgene.c')
0 files changed, 0 insertions, 0 deletions