Re: Return value for "impossible" situations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 7/25/21 6:15 PM, Valdis Klētnieks wrote:
The *proper* thing to do is, instead of deciding to return -EHIT_A_BUG, do a
WARN(), or BUG(), so that the dmesg has something that's at least potentially
useful.  Then use that information to fix the issue.

The question is, after the WARN_ON, what code does one return to user-
space?  What is the "kernel bug; go look at dmesg" return value?

(Obviously, there isn't an obvious one for this situation.  Thus my
original question about whether there was any convention.  Sadly, it
seems that there really isn't one, which means that I'm basically forced
to return a garbage error code that is likely to confuse a system
administrator or cause them to waste time chasing the wrong issue.)

--
========================================================================
                 In Soviet Russia, Google searches you!
========================================================================

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies




[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]

  Powered by Linux