Message ID | 9fb4925ea87677df44c75c435efc329f@codeaurora.org |
---|---|
State | RFC, archived |
Delegated to: | David Miller |
Headers | show |
On Tue, Mar 08, 2016 at 07:16:23PM -0700, subashab@codeaurora.org wrote: > > 2. Encrypted packet queued for decryption (asynchronous) > > static int esp_input(struct xfrm_state *x, struct sk_buff *skb) > ... > aead_request_set_callback(req, 0, esp_input_done, skb); I suppose we'll have to hold onto the device at this point. We may have to hold onto other resources too. > Would it make sense here to detect the device going away here using a > netdev notifier callback and free the packets after the asynchronous > callback returns. The same path is used for synchronous processing so you can't just change it to netif_rx_ni unconditionally. Cheers,
diff --git a/net/xfrm/xfrm_input.c b/net/xfrm/xfrm_input.c index 85d1d47..f791128 100644 --- a/net/xfrm/xfrm_input.c +++ b/net/xfrm/xfrm_input.c @@ -351,7 +351,7 @@ resume: if (decaps) { skb_dst_drop(skb); - netif_rx(skb); + netif_rx_ni(skb);