]> err.no Git - linux-2.6/blobdiff - net/atm/common.c
[ARM] 3008/1: the exception table is not read-only
[linux-2.6] / net / atm / common.c
index 6d16be334ea0a3578aed8e84dfaa4a7bd5483c78..63feea49fb139f6a0e96888c3f4f99c2325ac883 100644 (file)
@@ -12,7 +12,7 @@
 #include <linux/socket.h>      /* SOL_SOCKET */
 #include <linux/errno.h>       /* error codes */
 #include <linux/capability.h>
-#include <linux/mm.h>          /* verify_area */
+#include <linux/mm.h>
 #include <linux/sched.h>
 #include <linux/time.h>                /* struct timeval */
 #include <linux/skbuff.h>
@@ -46,7 +46,7 @@ static void __vcc_insert_socket(struct sock *sk)
        struct atm_vcc *vcc = atm_sk(sk);
        struct hlist_head *head = &vcc_hash[vcc->vci &
                                        (VCC_HTABLE_SIZE - 1)];
-       sk->sk_hashent = vcc->vci & (VCC_HTABLE_SIZE - 1);
+       sk->sk_hash = vcc->vci & (VCC_HTABLE_SIZE - 1);
        sk_add_node(sk, head);
 }
 
@@ -178,8 +178,6 @@ static void vcc_destroy_socket(struct sock *sk)
                if (vcc->push)
                        vcc->push(vcc, NULL); /* atmarpd has no push */
 
-               vcc_remove_socket(sk);  /* no more receive */
-
                while ((skb = skb_dequeue(&sk->sk_receive_queue)) != NULL) {
                        atm_return(vcc,skb->truesize);
                        kfree_skb(skb);
@@ -188,6 +186,8 @@ static void vcc_destroy_socket(struct sock *sk)
                module_put(vcc->dev->ops->owner);
                atm_dev_put(vcc->dev);
        }
+
+       vcc_remove_socket(sk);
 }
 
 
@@ -540,7 +540,7 @@ int vcc_sendmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *m,
                error = -EMSGSIZE;
                goto out;
        }
-       /* verify_area is done by net/socket.c */
+
        eff = (size+3) & ~3; /* align to word boundary */
        prepare_to_wait(sk->sk_sleep, &wait, TASK_INTERRUPTIBLE);
        error = 0;