Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
When the number of CPUs detected is greater than the number of CPUs in the system, rasdaemon will crash when it receives some events. Looking deeper, we also fail to use the poll method for similar reasons in this case. All of this can be prevented by checking to see how many CPUs are currently online (sysconf(_SC_NPROCESSORS_ONLN)) instead of how many CPUs the current kernel was configured to support (sysconf(_SC_NPROCESSORS_CONF)). For the kernel side of the discussion, see https://lore.kernel.org/lkml/CAM6Wdxft33zLeeXHhmNX5jyJtfGTLiwkQSApc=10fqf+rQh9DA@mail.gmail.com/T/ Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
- Loading branch information