From: David S. Miller Date: Wed, 24 Dec 2008 01:56:23 +0000 (-0800) Subject: Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 X-Git-Tag: v2.6.29-rc1~581^2~88 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=6332178d91ca1a9dbd99bd97cabbcf965d178e9f;p=linux-2.6-omap-h63xx.git Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/ppp_generic.c --- 6332178d91ca1a9dbd99bd97cabbcf965d178e9f diff --cc drivers/net/ppp_generic.c index c832d600d1e,714a23035de..06b448285eb --- a/drivers/net/ppp_generic.c +++ b/drivers/net/ppp_generic.c @@@ -2484,19 -2498,17 +2484,17 @@@ init_ppp_file(struct ppp_file *pf, int */ static void ppp_shutdown_interface(struct ppp *ppp) { - struct net_device *dev; - mutex_lock(&all_ppp_mutex); - ppp_lock(ppp); - dev = ppp->dev; - ppp->dev = NULL; - ppp_unlock(ppp); /* This will call dev_close() for us. */ - if (dev) { - unregister_netdev(dev); - free_netdev(dev); - } + ppp_lock(ppp); + if (!ppp->closing) { + ppp->closing = 1; + ppp_unlock(ppp); + unregister_netdev(ppp->dev); + } else + ppp_unlock(ppp); + - cardmap_set(&all_ppp_units, ppp->file.index, NULL); + unit_put(&ppp_units_idr, ppp->file.index); ppp->file.dead = 1; ppp->owner = NULL; wake_up_interruptible(&ppp->file.rwait);