[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4BBEE144.8070600@iki.fi>
Date: Fri, 09 Apr 2010 11:11:48 +0300
From: Timo Teräs <timo.teras@....fi>
To: Herbert Xu <herbert@...dor.apana.org.au>
CC: broonie@...nsource.wolfsonmicro.com, netdev@...r.kernel.org
Subject: Re: Crashes in xfrm_lookup
Herbert Xu wrote:
> Timo Teräs <timo.teras@....fi> wrote:
>> Happens because CONFIG_XFRM_SUB_POLICY is not enabled, and one of
>> the helper functions I used did unexpected things in that case.
>>
>> Try the following:
>
> Ugh, can we fix this some other way?
>
> The policy array should really only exist if SUB_POLICY is defined.
The problem was that my code could call it with zero polcies
assuming it'd do the right thing.
It's still really misleading to have generic function that does not
do the expected thing based on some config. Compiler should know
how to optimize the for loop away if it's being called with fixed
array size.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists