[PATCH 03/16] gtp: convert the global gtp_instance_list to a per netns list

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

Pablo Neira Ayuso pablo at soleta.eu
Mon Nov 16 17:59:54 UTC 2015


On Mon, Nov 16, 2015 at 04:06:44PM +0100, Andreas Schultz wrote:
> +static void __net_exit gtp_net_exit(struct net *net)
> +{
> +	struct gtp_net *gn = net_generic(net, gtp_net_id);
> +	struct gtp_instance *gti;
> +	LIST_HEAD(list);
> +
> +	rtnl_lock();
> +	list_for_each_entry_rcu(gti, &gn->gtp_instance_list, list) {

BTW, I have also removed the _rcu here.

The instance list is protected by rtnl_lock, so no need for safe
read-side interation here.

> +		gtp_dellink(gti->dev, &list);
> +	}
> +
> +	unregister_netdevice_many(&list);
> +	rtnl_unlock();
> +}



More information about the OpenBSC mailing list