Merge to Fedora kernel-2.6.18-1.2224_FC5 patched with stable patch-2.6.18.1-vs2.0...
[linux-2.6.git] / net / ax25 / af_ax25.c
index a2e0dd0..000695c 100644 (file)
@@ -13,7 +13,6 @@
  * Copyright (C) Hans Alblas PE1AYX (hans@esrac.ele.tue.nl)
  * Copyright (C) Frederic Rible F1OAT (frible@teaser.fr)
  */
-#include <linux/config.h>
 #include <linux/capability.h>
 #include <linux/module.h>
 #include <linux/errno.h>
@@ -146,7 +145,7 @@ struct sock *ax25_find_listener(ax25_address *addr, int digi,
        ax25_cb *s;
        struct hlist_node *node;
 
-       spin_lock_bh(&ax25_list_lock);
+       spin_lock(&ax25_list_lock);
        ax25_for_each(s, node, &ax25_list) {
                if ((s->iamdigi && !digi) || (!s->iamdigi && digi))
                        continue;
@@ -155,12 +154,12 @@ struct sock *ax25_find_listener(ax25_address *addr, int digi,
                        /* If device is null we match any device */
                        if (s->ax25_dev == NULL || s->ax25_dev->dev == dev) {
                                sock_hold(s->sk);
-                               spin_unlock_bh(&ax25_list_lock);
+                               spin_unlock(&ax25_list_lock);
                                return s->sk;
                        }
                }
        }
-       spin_unlock_bh(&ax25_list_lock);
+       spin_unlock(&ax25_list_lock);
 
        return NULL;
 }
@@ -175,7 +174,7 @@ struct sock *ax25_get_socket(ax25_address *my_addr, ax25_address *dest_addr,
        ax25_cb *s;
        struct hlist_node *node;
 
-       spin_lock_bh(&ax25_list_lock);
+       spin_lock(&ax25_list_lock);
        ax25_for_each(s, node, &ax25_list) {
                if (s->sk && !ax25cmp(&s->source_addr, my_addr) &&
                    !ax25cmp(&s->dest_addr, dest_addr) &&
@@ -186,7 +185,7 @@ struct sock *ax25_get_socket(ax25_address *my_addr, ax25_address *dest_addr,
                }
        }
 
-       spin_unlock_bh(&ax25_list_lock);
+       spin_unlock(&ax25_list_lock);
 
        return sk;
 }
@@ -236,7 +235,7 @@ void ax25_send_to_raw(ax25_address *addr, struct sk_buff *skb, int proto)
        struct sk_buff *copy;
        struct hlist_node *node;
 
-       spin_lock_bh(&ax25_list_lock);
+       spin_lock(&ax25_list_lock);
        ax25_for_each(s, node, &ax25_list) {
                if (s->sk != NULL && ax25cmp(&s->source_addr, addr) == 0 &&
                    s->sk->sk_type == SOCK_RAW &&
@@ -249,7 +248,7 @@ void ax25_send_to_raw(ax25_address *addr, struct sk_buff *skb, int proto)
                                kfree_skb(copy);
                }
        }
-       spin_unlock_bh(&ax25_list_lock);
+       spin_unlock(&ax25_list_lock);
 }
 
 /*
@@ -487,10 +486,9 @@ ax25_cb *ax25_create_cb(void)
 {
        ax25_cb *ax25;
 
-       if ((ax25 = kmalloc(sizeof(*ax25), GFP_ATOMIC)) == NULL)
+       if ((ax25 = kzalloc(sizeof(*ax25), GFP_ATOMIC)) == NULL)
                return NULL;
 
-       memset(ax25, 0x00, sizeof(*ax25));
        atomic_set(&ax25->refcount, 1);
 
        skb_queue_head_init(&ax25->write_queue);