Skip to content

Conversation

@oTTer-Chief
Copy link
Contributor

@oTTer-Chief oTTer-Chief commented Jan 30, 2025

Fixes scheduling while atomic caused by called kernel functions create mutexes inside the spin locked section.

Use mutexes instead of spin locks to protect sysfs callbacks preventing large atomic sections. Otherweis kmalloc with GFP_KERNEL and other kernel functions might sleep and stall the system.

On Ubuntu 24.04 this bug causes segfault of the user processes with BUG: scheduling while atomic messages reported in dmesg. In this case specifically a down_write() call sleped when system was under load.

- fixes scheduling while atomic caused by called kernel functions create
  mutexes inside the spin locked section
@oTTer-Chief oTTer-Chief marked this pull request as draft January 30, 2025 12:44
@oTTer-Chief oTTer-Chief marked this pull request as ready for review February 13, 2025 12:53
@oTTer-Chief oTTer-Chief merged commit cd54616 into master Feb 13, 2025
5 checks passed
@oTTer-Chief oTTer-Chief deleted the bug_sched_atomic branch February 13, 2025 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants