* SKB dst field is NULL when AEAD request complete() is called
@ 2016-05-24 12:03 Denis B
2016-05-26 9:29 ` Herbert Xu
0 siblings, 1 reply; 3+ messages in thread
From: Denis B @ 2016-05-24 12:03 UTC (permalink / raw)
To: linux-crypto
Working with kernel 3.12.14, in AEAD mode, I register my crypto driver
and the givencrypt() method in the driver gets called when I send
IPSec traffic. I store the request, and later call its complete()
method from a work queue. There is no actual encryption happening at
the moment, I'm just testing flow. As stated, the complete() call
stumbles upon a NULL pointer exception in xfrm_output_resume() because
skb_dst(skb) is NULL. When I receive the request in givencrypt(), dst
is not null in the SKB.
Why would the framework meddle with the SKB? Has anyone experienced
anything similar?
Thanks,
Dennis.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: SKB dst field is NULL when AEAD request complete() is called
2016-05-24 12:03 SKB dst field is NULL when AEAD request complete() is called Denis B
@ 2016-05-26 9:29 ` Herbert Xu
2016-05-26 10:04 ` Denis B
0 siblings, 1 reply; 3+ messages in thread
From: Herbert Xu @ 2016-05-26 9:29 UTC (permalink / raw)
To: Denis B; +Cc: linux-crypto
Denis B <begun.denis@gmail.com> wrote:
> Working with kernel 3.12.14, in AEAD mode, I register my crypto driver
> and the givencrypt() method in the driver gets called when I send
> IPSec traffic. I store the request, and later call its complete()
> method from a work queue. There is no actual encryption happening at
> the moment, I'm just testing flow. As stated, the complete() call
> stumbles upon a NULL pointer exception in xfrm_output_resume() because
> skb_dst(skb) is NULL. When I receive the request in givencrypt(), dst
> is not null in the SKB.
>
> Why would the framework meddle with the SKB? Has anyone experienced
> anything similar?
This is probably the result of some kind of a bug in your driver.
If however you're sure that your driver is doing the right thing,
then the bug would be in the network stack. You should discuss
networking issues on netdev@vger.kernel.org.
Cheers,
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: SKB dst field is NULL when AEAD request complete() is called
2016-05-26 9:29 ` Herbert Xu
@ 2016-05-26 10:04 ` Denis B
0 siblings, 0 replies; 3+ messages in thread
From: Denis B @ 2016-05-26 10:04 UTC (permalink / raw)
To: Herbert Xu; +Cc: linux-crypto
The bug was: return value of my driver's encrypt() function should
have been -EINPROGRESS to support asynchronous operation.
Thanks.
On Thu, May 26, 2016 at 12:29 PM, Herbert Xu
<herbert@gondor.apana.org.au> wrote:
> Denis B <begun.denis@gmail.com> wrote:
>> Working with kernel 3.12.14, in AEAD mode, I register my crypto driver
>> and the givencrypt() method in the driver gets called when I send
>> IPSec traffic. I store the request, and later call its complete()
>> method from a work queue. There is no actual encryption happening at
>> the moment, I'm just testing flow. As stated, the complete() call
>> stumbles upon a NULL pointer exception in xfrm_output_resume() because
>> skb_dst(skb) is NULL. When I receive the request in givencrypt(), dst
>> is not null in the SKB.
>>
>> Why would the framework meddle with the SKB? Has anyone experienced
>> anything similar?
>
> This is probably the result of some kind of a bug in your driver.
>
> If however you're sure that your driver is doing the right thing,
> then the bug would be in the network stack. You should discuss
> networking issues on netdev@vger.kernel.org.
>
> Cheers,
> --
> Email: Herbert Xu <herbert@gondor.apana.org.au>
> Home Page: http://gondor.apana.org.au/~herbert/
> PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-05-26 10:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-24 12:03 SKB dst field is NULL when AEAD request complete() is called Denis B
2016-05-26 9:29 ` Herbert Xu
2016-05-26 10:04 ` Denis B
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox