Re: [PATCH 1/3] net: Add a test to see if a skb is freeable in irq context

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: ebiederm@xxxxxxxxxxxx (Eric W. Biederman)
Date: Thu, 27 Mar 2014 18:15:47 -0700

> 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@xxxxxxxxxxxx>
 ...
> +	return !skb->destructor &&
> +#if IS_ENABLED(CONFIG_XFRM)
> +		!skb->sp &&
> +#endif
> +#if IS_ENABLED(CONFIG_NF_CONNTRACK)
> +		!skb->nfct &&
> +#endif
> +		!skb->_skb_refdst &&
> +		!skb_has_frag_list(skb);

I think you need to add "!skb->nf_bridge &&" to this test.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Discussion]     [TCP Instrumentation]     [Ethernet Bridging]     [Linux Wireless Networking]     [Linux WPAN Networking]     [Linux Host AP]     [Linux WPAN Networking]     [Linux Bluetooth Networking]     [Linux ATH6KL Networking]     [Linux Networking Users]     [Linux Coverity]     [VLAN]     [Git]     [IETF Annouce]     [Linux Assembly]     [Security]     [Bugtraq]     [Yosemite Information]     [MIPS Linux]     [ARM Linux Kernel]     [ARM Linux]     [Linux Virtualization]     [Linux IDE]     [Linux RAID]     [Linux SCSI]