[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1396381787.3989.12.camel@edumazet-glaptop2.roam.corp.google.com>
Date: Tue, 01 Apr 2014 12:49:47 -0700
From: Eric Dumazet <eric.dumazet@...il.com>
To: "Eric W. Biederman" <ebiederm@...ssion.com>
Cc: David Miller <davem@...emloft.net>,
'Bjørn Mork' <bjorn@...k.no>,
Ben Hutchings <ben@...adent.org.uk>,
"stephen@...workplumber.org" <stephen@...workplumber.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"xiyou.wangcong@...il.com" <xiyou.wangcong@...il.com>,
"mpm@...enic.com" <mpm@...enic.com>,
"satyam.sharma@...il.com" <satyam.sharma@...il.com>,
David Laight <David.Laight@...LAB.COM>,
Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
Subject: Re: [PATCH v2 1/2] net: Add a test to see if a skb is freeable in
irq context
On Tue, 2014-04-01 at 12:20 -0700, Eric W. Biederman wrote:
> Currently netpoll and skb_release_head_state assume that a skb is
> freeable in hard irq context except when skb->destructor is set.
>
> The reality is far from this. So add a function skb_irq_freeable to
> compute the full test and in the process be the living documentation
> of what the requirements are of actually freeing a skb in hard irq
> context.
>
> Signed-off-by: "Eric W. Biederman" <ebiederm@...ssion.com>
> ---
> include/linux/skbuff.h | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
>
> diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
> index 18ef0224fb6a..113fee1b7b63 100644
> --- a/include/linux/skbuff.h
> +++ b/include/linux/skbuff.h
> @@ -2833,6 +2833,19 @@ static inline void skb_init_secmark(struct sk_buff *skb)
> { }
> #endif
>
> +static inline bool skb_irq_freeable(struct sk_buff *skb)
> +{
This probably should be 'const struct sk_buff *skb'
Acked-by: Eric Dumazet <edumazet@...gle.com>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists