lkml.org 
[lkml]   [2004]   [Feb]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH/proposal] dm-crypt: add digest-based iv generation mode
On Tue, 24 Feb 2004, Christophe Saout wrote:

> Am Di, den 24.02.2004 schrieb James Morris um 23:26:
>
> > > BTW: I think there's a bug in the ipv6 code, it uses spin_lock to
> > > protect itself, this will cause a sleep-inside-spinlock warning. (found
> > > while grepping through the source for other cryptoapi users)
> >
> > Where is the bug?
>
> net/ipv6/addrconf.c: __ipv6_regen_rndid
>
> > spin_lock(&md5_tfm_lock);
> > if (unlikely(md5_tfm == NULL)) {
> > spin_unlock(&md5_tfm_lock);
> > return -1;
> > }
> > crypto_digest_init(md5_tfm);
> > crypto_digest_update(md5_tfm, sg, 2);
> > crypto_digest_final(md5_tfm, idev->work_digest);
> > spin_unlock(&md5_tfm_lock);

This looks like too much work to be done under a spinlock, and generally,
that's why the API does not support these kinds of functions from being
called under one.


- James
--
James Morris
<jmorris@redhat.com>



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:01    [W:0.496 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site