[go: up one dir, main page]

|
|
Log in / Subscribe / Register

Warning about WARN_ON()

Warning about WARN_ON()

Posted Apr 18, 2024 15:22 UTC (Thu) by mfuzzey (subscriber, #57966)
Parent article: Warning about WARN_ON()

The nice (from a developpers point of view) thing about WARN_ON is that gives a stack trace which can be helpful in understanding why the situation occured which dev_warn() and pr_warn() don't do. The stack trace is also "noisier" which seems to help getting the problem reported.

Maybe WARN_ON_NEVER_PANIC() or WARN_ON_MAY_PANIC() ?

But the reasoning for avoiding WARN_ON() related to the panic_on_warn option seems very strange to me.
If the system administrator / device manufacturer decides that rebooting on a warning is important to them that's their perogative right?
If people stop using WARN_ON() then panic_on_warn becomes pointless and the said administrators lose whatever they thought they were gaining by panic_on_warn.


to post comments

Warning about WARN_ON()

Posted Apr 24, 2024 16:55 UTC (Wed) by crystalwood (guest, #168140) [Link]

I vote for WHINE_ON()


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds