[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20181116.195036.1120979831963497428.davem@davemloft.net>
Date: Fri, 16 Nov 2018 19:50:36 -0800 (PST)
From: David Miller <davem@...emloft.net>
To: gbastien@...satic.net
Cc: netdev@...r.kernel.org, mathieu.desnoyers@...icios.com,
rostedt@...dmis.org, mingo@...hat.com
Subject: Re: [PATCH v3] net: Add trace events for all receive exit points
From: Geneviève Bastien <gbastien@...satic.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.
Powered by blists - more mailing lists