From 6b8649b3ab876d8594a24c5a475908c00b8355de Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 16 Nov 2014 14:23:24 +0100 Subject: headers: delete the list in unregister_netdevice_many() Upstream commit: 97666f936e0656a1b28c40cc33981a8db65e1a11 unregister_netdevice_many() now deletes the list after running, in the earlier days mac80211 and so on, did this on their own. We extended the old unregister_netdevice_many() function for all kernel versions that do not have a fixed unregister_netdevice_many(). Signed-off-by: Hauke Mehrtens --- backport/backport-include/linux/netdevice.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/backport/backport-include/linux/netdevice.h b/backport/backport-include/linux/netdevice.h index 88267710..4eec6c03 100644 --- a/backport/backport-include/linux/netdevice.h +++ b/backport/backport-include/linux/netdevice.h @@ -176,4 +176,27 @@ static inline void netdev_reset_queue(struct net_device *dev_queue) count) #endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,17,0) */ +/* + * This backports this commit from upstream: + * commit 87757a917b0b3c0787e0563c679762152be81312 + * net: force a list_del() in unregister_netdevice_many() + */ +#if (!(LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,45) && \ + LINUX_VERSION_CODE < KERNEL_VERSION(3,11,0)) && \ + !(LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,23) && \ + LINUX_VERSION_CODE < KERNEL_VERSION(3,13,0)) && \ + !(LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,9) && \ + LINUX_VERSION_CODE < KERNEL_VERSION(3,15,0)) && \ + !(LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,2) && \ + LINUX_VERSION_CODE < KERNEL_VERSION(3,16,0)) && \ + (LINUX_VERSION_CODE < KERNEL_VERSION(3,16,0))) +static inline void backport_unregister_netdevice_many(struct list_head *head) +{ + unregister_netdevice_many(head); + + list_del(head); +} +#define unregister_netdevice_many LINUX_BACKPORT(unregister_netdevice_many) +#endif + #endif /* __BACKPORT_NETDEVICE_H */ -- cgit v1.2.3