]> err.no Git - linux-2.6/blobdiff - net/tipc/user_reg.c
[TIPC]: Fixed skb_under_panic caused by tipc_link_bundle_buf
[linux-2.6] / net / tipc / user_reg.c
index 106200d765873d074bf3afd515a25bab7104e6da..1e3ae57c722872f2e2d74d28891ecb39d53d0f21 100644 (file)
@@ -65,9 +65,9 @@ struct tipc_user {
 #define MAX_USERID 64
 #define USER_LIST_SIZE ((MAX_USERID + 1) * sizeof(struct tipc_user))
 
-static struct tipc_user *users = 0;
+static struct tipc_user *users = NULL;
 static u32 next_free_user = MAX_USERID + 1;
-static spinlock_t reg_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(reg_lock);
 
 /**
  * reg_init - create TIPC user registry (but don't activate it)
@@ -149,7 +149,7 @@ void tipc_reg_stop(void)
                        reg_callback(&users[id]);
        }
        kfree(users);
-       users = 0;
+       users = NULL;
 }
 
 /**