On Wed, Apr 26, 2017 at 11:52:47AM +0000, Ilan Tayari wrote:
> 
> esp_output_head() might do an skb_cow, which then invalidates the esp.esph 
> pointer and causes a crash later on.
> I would expect the ip_esp_hdr() call to be after the esp_output_head() call.
> 
> But it seems like this pointer was saved here around the call to 
> esp_output_head() on purpose.
> Is that really so? 

Yes, it is needed for udpencap, this might also change esp.esph pointer.
I guess this needs to be done also if skb_cow invalidates the esp.esph
pointer.

> 
> Also, esp6/esp6_offload don't make use of esp_info.esph
> Only esp_output_tail() uses it, and could have done everything it does 
> without it.
> So maybe it's un-needed?

IPv6 does not have udpencap, so it might be not needed there.

> 
> I am still testing a fix patch for the crash, there may be also something 
> similar on the RX path, though.

Ok, thanks!

Reply via email to