Messages in this thread | | | Date | Tue, 24 Feb 2004 17:45:49 -0500 (EST) | From | James Morris <> | Subject | Re: [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/
| |