]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/net/ppp_generic.c
Merge branch 'for-2.6.27' of git://git.infradead.org/users/dwmw2/firmware-2.6
[mv-sheeva.git] / drivers / net / ppp_generic.c
index d3207c0da89561eb345b1d0873eb19b5a3695438..83625fdff3dd810944aa8cbd60165a32b1a3f937 100644 (file)
@@ -39,6 +39,7 @@
 #include <linux/if_arp.h>
 #include <linux/ip.h>
 #include <linux/tcp.h>
+#include <linux/smp_lock.h>
 #include <linux/spinlock.h>
 #include <linux/rwsem.h>
 #include <linux/stddef.h>
@@ -353,6 +354,7 @@ static const int npindex_to_ethertype[NUM_NP] = {
  */
 static int ppp_open(struct inode *inode, struct file *file)
 {
+       cycle_kernel_lock();
        /*
         * This could (should?) be enforced by the permissions on /dev/ppp.
         */
@@ -2458,6 +2460,7 @@ ppp_create_interface(int unit, int *retp)
 
 out3:
        atomic_dec(&ppp_unit_count);
+       unregister_netdev(dev);
 out2:
        mutex_unlock(&all_ppp_mutex);
        free_netdev(dev);