Subject: Re: [PATCH] Fix ESP SA loading (by default)

From: Patrick McHardy <[email-masked]>
Date: Wed, 05 Nov 2008 11:03:18 +0100

David Miller wrote:
> From: Alexey Dobriyan <[email-masked]>
> Date: Wed, 5 Nov 2008 12:54:28 +0300
> 
>> It was ENOENT from crypto_alg_mod_lookup(), actually.
>>
>> I think liberal printk additions are the way to go.
> 
> Saying "type dmesg" to figure out why an IPSEC configuration fails
> is not very user friendly, even for application developers.

Indeed. I also prefer the *error_desc, for netlink errors we could
then include the message in an extended error attribute or something
like that. Probably its even a necessity for userspace to be able to
associate errors properly in case multiple messages are sent at once.

> About the rmmod thing, we can do something similar to how
> we handle nesting of irq_regs().  Ie. there are things that
> push and pop the stack of ->error_desc.  rmmod operations
> could be one of those things

Alternatively we could simply strdup the error message (or copy it
to a reserved area to avoid running into memory allocation errors).
That avoids having to mess with foreign task structs when
unloading modules.