On Mon, Aug 23, 2010 at 5:39 PM, Miloslav Trmac <m...@redhat.com> wrote:
> ----- "Shirish Pargaonkar" <shirishpargaon...@gmail.com> wrote:
>> Instead of determining and allocating a char array for use during usage of
>> crypto_shash_* calls, would like to instead dynamically
>> allocate (and free) storage for the duration of crypto calculation
>> (crypto_shash_init,
>> crypto_shash_update, and crypto_shash_final)
>> But everytime I try, it results in some sort of oops in the cifs module.
> Let me just suggest something, without trying it...
>
>> +struct sdesc {
>> +       struct shash_desc shash;
>> +       char *ctx;
>        char ctx[];
> would be correct here.
>> +};
> And you need to allocate both shash_desc and "ctx" together as a single piece 
> of memory - exactly mirror the memory layout of the original "sdesc" variable.
>    Mirek
>

Mirek,

Thanks, that worked.
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to