[TIPC]: fix tipc_link_create error handling
[powerpc.git] / net / netfilter / nfnetlink_queue.c
index b6585ca..bb65a38 100644 (file)
@@ -648,7 +648,7 @@ nfqnl_mangle(void *data, int data_len, struct nfqnl_queue_entry *e)
        }
        if (!skb_make_writable(&e->skb, data_len))
                return -ENOMEM;
-       memcpy(e->skb->data, data, data_len);
+       skb_copy_to_linear_data(e->skb, data, data_len);
        e->skb->ip_summed = CHECKSUM_NONE;
        return 0;
 }
@@ -783,7 +783,7 @@ static const int nfqa_verdict_min[NFQA_MAX] = {
 
 static int
 nfqnl_recv_verdict(struct sock *ctnl, struct sk_buff *skb,
-                  struct nlmsghdr *nlh, struct nfattr *nfqa[], int *errp)
+                  struct nlmsghdr *nlh, struct nfattr *nfqa[])
 {
        struct nfgenmsg *nfmsg = NLMSG_DATA(nlh);
        u_int16_t queue_num = ntohs(nfmsg->res_id);
@@ -848,7 +848,7 @@ err_out_put:
 
 static int
 nfqnl_recv_unsupp(struct sock *ctnl, struct sk_buff *skb,
-                 struct nlmsghdr *nlh, struct nfattr *nfqa[], int *errp)
+                 struct nlmsghdr *nlh, struct nfattr *nfqa[])
 {
        return -ENOTSUPP;
 }
@@ -865,7 +865,7 @@ static struct nf_queue_handler nfqh = {
 
 static int
 nfqnl_recv_config(struct sock *ctnl, struct sk_buff *skb,
-                 struct nlmsghdr *nlh, struct nfattr *nfqa[], int *errp)
+                 struct nlmsghdr *nlh, struct nfattr *nfqa[])
 {
        struct nfgenmsg *nfmsg = NLMSG_DATA(nlh);
        u_int16_t queue_num = ntohs(nfmsg->res_id);
@@ -913,9 +913,7 @@ nfqnl_recv_config(struct sock *ctnl, struct sk_buff *skb,
                case NFQNL_CFG_CMD_PF_UNBIND:
                        QDEBUG("unregistering queue handler for pf=%u\n",
                                ntohs(cmd->pf));
-                       /* This is a bug and a feature.  We can unregister
-                        * other handlers(!) */
-                       ret = nf_unregister_queue_handler(ntohs(cmd->pf));
+                       ret = nf_unregister_queue_handler(ntohs(cmd->pf), &nfqh);
                        break;
                default:
                        ret = -EINVAL;
@@ -1050,7 +1048,7 @@ static int seq_show(struct seq_file *s, void *v)
                          atomic_read(&inst->use));
 }
 
-static struct seq_operations nfqnl_seq_ops = {
+static const struct seq_operations nfqnl_seq_ops = {
        .start  = seq_start,
        .next   = seq_next,
        .stop   = seq_stop,