Ignat Korchagin <[email protected]> wrote:

> > +                       sig->digest = kmalloc(umax(sinfo->authattrs_len, 
> > sig->digest_size),
> > +                                             GFP_KERNEL);
> 
> I'm still bothered by this "reallocation". You mentioned we need to do
> some parsing for attributes, but it seems by the time this function is
> called we have all the data to do something like
> kmalloc(sig->algo_does_hash ? umax(sinfo->authattrs_len,
> sig->digest_size) : sig->digest_size, GFP_KERNEL) during the initial
> allocation. Or am I missing something?

Actually, you're right, we do have that info at this point

David


Reply via email to