Herbert Xu wrote:
> On Mon, Jul 10, 2006 at 05:40:25PM +1200, Michal Ludvig wrote:
>> ### setkey:
>> NET: Registered protocol family 15
>> padlock: Fallback driver 'sha1-generic' could not be loaded!
>> __crypto_alloc_tfm(): err=1  <<< Yes, returned 1
> 
> Ah that's the problem.  This is a kernel-style errno return.  It needs
> to be negative to really be an error (something like -ENOENT or -ENOMEM
> would do for your case).

I wrote the code before applying your last patch when it simply checked
for !0 [if (alg->cra_init && alg->cra_init(tfm)) ...] so I didn't bother
to return something meaningful.

Anyway, it went through the error path but ended up with allocated tfm.
Not good, imho...

Just tried to return -ENOENT and it fails gracefully, setkey says
"Invalid argument". Good.

I'll post updated padlock-sha patch soon.

Michal
-
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to