From: Geneviève Bastien <gbast...@versatic.net>
Date: Tue, 13 Nov 2018 15:13:26 -0500

> @@ -5222,9 +5228,14 @@ static void netif_receive_skb_list_internal(struct 
> list_head *head)
>   */
>  int netif_receive_skb(struct sk_buff *skb)
>  {
> +     int ret;
> +
>       trace_netif_receive_skb_entry(skb);
>  
> -     return netif_receive_skb_internal(skb);
> +     ret = netif_receive_skb_internal(skb);
> +     trace_netif_receive_skb_exit(skb, ret);

Every time I read this code from now on I'm going to say to myself
"oh crap, we reference 'skb' after it's potentially freed up"

I really don't like this.

I know only the pointer is used, but that pointer can be reallocated
to another SLAB object, even another SKB, by the time these exit
tracepoints execute.

Sorry, I can't really convince myself to apply this now.

Reply via email to