Subject: Re: [XFRM]: xfrm_algo_clone() allocates too much memory

From: Eric Dumazet <[email-masked]>
Date: Wed, 09 Jan 2008 08:51:39 +0100

David Miller a écrit :
> From: Eric Dumazet <[email-masked]>
> Date: Wed, 09 Jan 2008 08:29:11 +0100
> 
> Thanks for catching this.
> 
> Applied to net-2.6
> 
>> +static inline int xfrm_alg_len(struct xfrm_algo *alg)
>> +{
>> +	return sizeof(*alg) + ((alg->alg_key_len + 7) / 8);
>> +}
> 
> That gets emitted as a divide doesn't it :-))))
> 
> 
Yes I have a patch for these divides, but will apply on 2.6.25 once this one 
hits it.  (this saves 192 bytes of kernel text BTW)