Skip to content

Fix kernel panic when unload bh_threaded module #320

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 8, 2025

Conversation

xhorn-pan
Copy link
Contributor

@xhorn-pan xhorn-pan commented May 7, 2025

Ensuring the free_irq function properly releases IRQs for buttons, call free_irq() with button's device handler instead of NULL.

Summary by Bito

This pull request resolves a kernel panic issue by ensuring the free_irq function is called with the correct device handler when unloading the bh_threaded module. This enhancement improves the stability and reliability of IRQ management for button devices.

Unit tests added: False

Estimated effort to review (1-5, lower is better): 2 - The changes are straightforward and primarily focus on fixing a specific issue, making the review process relatively simple.

Copy link
Contributor

@jserv jserv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use clang-format to ensure the consistent coding style.

@jserv
Copy link
Contributor

jserv commented May 8, 2025

You don't have to close and submit another pull request if you want to refine the commits. Instead, use git rebase -i and git push --force.

Ensuring the free_irq function properly releases IRQs for buttons,
call free_irq() with button's device handler instead of NULL.
@xhorn-pan xhorn-pan force-pushed the bh-thread-rmmod-panic-fix branch from 44aeac0 to d30d811 Compare May 8, 2025 12:01
@xhorn-pan
Copy link
Contributor Author

Little bit embarrassing, not clang-format but c-pointer problem.

@jserv jserv merged commit d159893 into sysprog21:master May 8, 2025
1 check passed
@jserv
Copy link
Contributor

jserv commented May 8, 2025

Thank @xhorn-pan for contributing!

@xhorn-pan
Copy link
Contributor Author

Thank you for writing and maintaining this book, I am learned a lot and still learning from it.

@xhorn-pan xhorn-pan deleted the bh-thread-rmmod-panic-fix branch May 9, 2025 01:17
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