Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
[pandora-kernel.git] / net / ax25 / ax25_uid.c
index 75c7664..57aeba7 100644 (file)
  *     Callsign/UID mapper. This is in kernel space for security on multi-amateur machines.
  */
 
-HLIST_HEAD(ax25_uid_list);
+static HLIST_HEAD(ax25_uid_list);
 static DEFINE_RWLOCK(ax25_uid_lock);
 
-int ax25_uid_policy = 0;
+int ax25_uid_policy;
 
 EXPORT_SYMBOL(ax25_uid_policy);
 
@@ -144,6 +144,7 @@ int ax25_uid_ioctl(int cmd, struct sockaddr_ax25 *sax)
 #ifdef CONFIG_PROC_FS
 
 static void *ax25_uid_seq_start(struct seq_file *seq, loff_t *pos)
+       __acquires(ax25_uid_lock)
 {
        struct ax25_uid_assoc *pt;
        struct hlist_node *node;
@@ -167,6 +168,7 @@ static void *ax25_uid_seq_next(struct seq_file *seq, void *v, loff_t *pos)
 }
 
 static void ax25_uid_seq_stop(struct seq_file *seq, void *v)
+       __releases(ax25_uid_lock)
 {
        read_unlock(&ax25_uid_lock);
 }
@@ -185,7 +187,7 @@ static int ax25_uid_seq_show(struct seq_file *seq, void *v)
        return 0;
 }
 
-static struct seq_operations ax25_uid_seqops = {
+static const struct seq_operations ax25_uid_seqops = {
        .start = ax25_uid_seq_start,
        .next = ax25_uid_seq_next,
        .stop = ax25_uid_seq_stop,
@@ -216,9 +218,11 @@ void __exit ax25_uid_free(void)
        struct hlist_node *node;
 
        write_lock(&ax25_uid_lock);
+again:
        ax25_uid_for_each(ax25_uid, node, &ax25_uid_list) {
                hlist_del_init(&ax25_uid->uid_node);
                ax25_uid_put(ax25_uid);
+               goto again;
        }
        write_unlock(&ax25_uid_lock);
 }