diff options
-rw-r--r-- | net/9p/client.c | 2 | ||||
-rw-r--r-- | net/atm/lec.c | 2 | ||||
-rw-r--r-- | net/decnet/dn_nsp_out.c | 2 | ||||
-rw-r--r-- | net/ipv4/af_inet.c | 2 | ||||
-rw-r--r-- | net/ipv4/fib_trie.c | 13 | ||||
-rw-r--r-- | net/ipv4/netfilter/nf_nat_snmp_basic.c | 4 | ||||
-rw-r--r-- | net/ipv6/exthdrs.c | 4 | ||||
-rw-r--r-- | net/irda/irqueue.c | 6 | ||||
-rw-r--r-- | net/l2tp/l2tp_ppp.c | 8 | ||||
-rw-r--r-- | net/mac80211/scan.c | 3 | ||||
-rw-r--r-- | net/netfilter/nf_conntrack_core.c | 2 | ||||
-rw-r--r-- | net/packet/af_packet.c | 9 | ||||
-rw-r--r-- | net/tipc/port.c | 9 | ||||
-rw-r--r-- | net/tipc/socket.c | 2 |
14 files changed, 32 insertions, 36 deletions
diff --git a/net/9p/client.c b/net/9p/client.c index a170893d70e0..5cbea903a5ab 100644 --- a/net/9p/client.c +++ b/net/9p/client.c | |||
@@ -1548,7 +1548,7 @@ p9_client_read(struct p9_fid *fid, char *data, char __user *udata, u64 offset, | |||
1548 | kernel_buf = 1; | 1548 | kernel_buf = 1; |
1549 | indata = data; | 1549 | indata = data; |
1550 | } else | 1550 | } else |
1551 | indata = (char *)udata; | 1551 | indata = udata; |
1552 | /* | 1552 | /* |
1553 | * response header len is 11 | 1553 | * response header len is 11 |
1554 | * PDU Header(7) + IO Size (4) | 1554 | * PDU Header(7) + IO Size (4) |
diff --git a/net/atm/lec.c b/net/atm/lec.c index 3da125c384ea..2e3d942e77f1 100644 --- a/net/atm/lec.c +++ b/net/atm/lec.c | |||
@@ -1604,7 +1604,7 @@ static void lec_arp_expire_vcc(unsigned long data) | |||
1604 | { | 1604 | { |
1605 | unsigned long flags; | 1605 | unsigned long flags; |
1606 | struct lec_arp_table *to_remove = (struct lec_arp_table *)data; | 1606 | struct lec_arp_table *to_remove = (struct lec_arp_table *)data; |
1607 | struct lec_priv *priv = (struct lec_priv *)to_remove->priv; | 1607 | struct lec_priv *priv = to_remove->priv; |
1608 | 1608 | ||
1609 | del_timer(&to_remove->timer); | 1609 | del_timer(&to_remove->timer); |
1610 | 1610 | ||
diff --git a/net/decnet/dn_nsp_out.c b/net/decnet/dn_nsp_out.c index 564a6ad13ce7..8a96047c7c94 100644 --- a/net/decnet/dn_nsp_out.c +++ b/net/decnet/dn_nsp_out.c | |||
@@ -322,7 +322,7 @@ static __le16 *dn_mk_ack_header(struct sock *sk, struct sk_buff *skb, unsigned c | |||
322 | /* Set "cross subchannel" bit in ackcrs */ | 322 | /* Set "cross subchannel" bit in ackcrs */ |
323 | ackcrs |= 0x2000; | 323 | ackcrs |= 0x2000; |
324 | 324 | ||
325 | ptr = (__le16 *)dn_mk_common_header(scp, skb, msgflag, hlen); | 325 | ptr = dn_mk_common_header(scp, skb, msgflag, hlen); |
326 | 326 | ||
327 | *ptr++ = cpu_to_le16(acknum); | 327 | *ptr++ = cpu_to_le16(acknum); |
328 | *ptr++ = cpu_to_le16(ackcrs); | 328 | *ptr++ = cpu_to_le16(ackcrs); |
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c index c8f7aee587d1..e4e8e00a2c91 100644 --- a/net/ipv4/af_inet.c +++ b/net/ipv4/af_inet.c | |||
@@ -553,7 +553,7 @@ int inet_dgram_connect(struct socket *sock, struct sockaddr *uaddr, | |||
553 | 553 | ||
554 | if (!inet_sk(sk)->inet_num && inet_autobind(sk)) | 554 | if (!inet_sk(sk)->inet_num && inet_autobind(sk)) |
555 | return -EAGAIN; | 555 | return -EAGAIN; |
556 | return sk->sk_prot->connect(sk, (struct sockaddr *)uaddr, addr_len); | 556 | return sk->sk_prot->connect(sk, uaddr, addr_len); |
557 | } | 557 | } |
558 | EXPORT_SYMBOL(inet_dgram_connect); | 558 | EXPORT_SYMBOL(inet_dgram_connect); |
559 | 559 | ||
diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c index 30b88d7b4bd6..18cbc15b20d5 100644 --- a/net/ipv4/fib_trie.c +++ b/net/ipv4/fib_trie.c | |||
@@ -1007,9 +1007,9 @@ static void trie_rebalance(struct trie *t, struct tnode *tn) | |||
1007 | while (tn != NULL && (tp = node_parent((struct rt_trie_node *)tn)) != NULL) { | 1007 | while (tn != NULL && (tp = node_parent((struct rt_trie_node *)tn)) != NULL) { |
1008 | cindex = tkey_extract_bits(key, tp->pos, tp->bits); | 1008 | cindex = tkey_extract_bits(key, tp->pos, tp->bits); |
1009 | wasfull = tnode_full(tp, tnode_get_child(tp, cindex)); | 1009 | wasfull = tnode_full(tp, tnode_get_child(tp, cindex)); |
1010 | tn = (struct tnode *) resize(t, (struct tnode *)tn); | 1010 | tn = (struct tnode *)resize(t, tn); |
1011 | 1011 | ||
1012 | tnode_put_child_reorg((struct tnode *)tp, cindex, | 1012 | tnode_put_child_reorg(tp, cindex, |
1013 | (struct rt_trie_node *)tn, wasfull); | 1013 | (struct rt_trie_node *)tn, wasfull); |
1014 | 1014 | ||
1015 | tp = node_parent((struct rt_trie_node *) tn); | 1015 | tp = node_parent((struct rt_trie_node *) tn); |
@@ -1024,7 +1024,7 @@ static void trie_rebalance(struct trie *t, struct tnode *tn) | |||
1024 | 1024 | ||
1025 | /* Handle last (top) tnode */ | 1025 | /* Handle last (top) tnode */ |
1026 | if (IS_TNODE(tn)) | 1026 | if (IS_TNODE(tn)) |
1027 | tn = (struct tnode *)resize(t, (struct tnode *)tn); | 1027 | tn = (struct tnode *)resize(t, tn); |
1028 | 1028 | ||
1029 | rcu_assign_pointer(t->trie, (struct rt_trie_node *)tn); | 1029 | rcu_assign_pointer(t->trie, (struct rt_trie_node *)tn); |
1030 | tnode_free_flush(); | 1030 | tnode_free_flush(); |
@@ -1125,7 +1125,7 @@ static struct list_head *fib_insert_node(struct trie *t, u32 key, int plen) | |||
1125 | node_set_parent((struct rt_trie_node *)l, tp); | 1125 | node_set_parent((struct rt_trie_node *)l, tp); |
1126 | 1126 | ||
1127 | cindex = tkey_extract_bits(key, tp->pos, tp->bits); | 1127 | cindex = tkey_extract_bits(key, tp->pos, tp->bits); |
1128 | put_child(t, (struct tnode *)tp, cindex, (struct rt_trie_node *)l); | 1128 | put_child(t, tp, cindex, (struct rt_trie_node *)l); |
1129 | } else { | 1129 | } else { |
1130 | /* Case 3: n is a LEAF or a TNODE and the key doesn't match. */ | 1130 | /* Case 3: n is a LEAF or a TNODE and the key doesn't match. */ |
1131 | /* | 1131 | /* |
@@ -1160,8 +1160,7 @@ static struct list_head *fib_insert_node(struct trie *t, u32 key, int plen) | |||
1160 | 1160 | ||
1161 | if (tp) { | 1161 | if (tp) { |
1162 | cindex = tkey_extract_bits(key, tp->pos, tp->bits); | 1162 | cindex = tkey_extract_bits(key, tp->pos, tp->bits); |
1163 | put_child(t, (struct tnode *)tp, cindex, | 1163 | put_child(t, tp, cindex, (struct rt_trie_node *)tn); |
1164 | (struct rt_trie_node *)tn); | ||
1165 | } else { | 1164 | } else { |
1166 | rcu_assign_pointer(t->trie, (struct rt_trie_node *)tn); | 1165 | rcu_assign_pointer(t->trie, (struct rt_trie_node *)tn); |
1167 | tp = tn; | 1166 | tp = tn; |
@@ -1620,7 +1619,7 @@ static void trie_leaf_remove(struct trie *t, struct leaf *l) | |||
1620 | 1619 | ||
1621 | if (tp) { | 1620 | if (tp) { |
1622 | t_key cindex = tkey_extract_bits(l->key, tp->pos, tp->bits); | 1621 | t_key cindex = tkey_extract_bits(l->key, tp->pos, tp->bits); |
1623 | put_child(t, (struct tnode *)tp, cindex, NULL); | 1622 | put_child(t, tp, cindex, NULL); |
1624 | trie_rebalance(t, tp); | 1623 | trie_rebalance(t, tp); |
1625 | } else | 1624 | } else |
1626 | RCU_INIT_POINTER(t->trie, NULL); | 1625 | RCU_INIT_POINTER(t->trie, NULL); |
diff --git a/net/ipv4/netfilter/nf_nat_snmp_basic.c b/net/ipv4/netfilter/nf_nat_snmp_basic.c index 746edec8b86e..bac712293fd6 100644 --- a/net/ipv4/netfilter/nf_nat_snmp_basic.c +++ b/net/ipv4/netfilter/nf_nat_snmp_basic.c | |||
@@ -405,7 +405,7 @@ static unsigned char asn1_octets_decode(struct asn1_ctx *ctx, | |||
405 | 405 | ||
406 | ptr = *octets; | 406 | ptr = *octets; |
407 | while (ctx->pointer < eoc) { | 407 | while (ctx->pointer < eoc) { |
408 | if (!asn1_octet_decode(ctx, (unsigned char *)ptr++)) { | 408 | if (!asn1_octet_decode(ctx, ptr++)) { |
409 | kfree(*octets); | 409 | kfree(*octets); |
410 | *octets = NULL; | 410 | *octets = NULL; |
411 | return 0; | 411 | return 0; |
@@ -759,7 +759,7 @@ static unsigned char snmp_object_decode(struct asn1_ctx *ctx, | |||
759 | } | 759 | } |
760 | break; | 760 | break; |
761 | case SNMP_OBJECTID: | 761 | case SNMP_OBJECTID: |
762 | if (!asn1_oid_decode(ctx, end, (unsigned long **)&lp, &len)) { | 762 | if (!asn1_oid_decode(ctx, end, &lp, &len)) { |
763 | kfree(id); | 763 | kfree(id); |
764 | return 0; | 764 | return 0; |
765 | } | 765 | } |
diff --git a/net/ipv6/exthdrs.c b/net/ipv6/exthdrs.c index 6447dc49429f..fa3d9c328092 100644 --- a/net/ipv6/exthdrs.c +++ b/net/ipv6/exthdrs.c | |||
@@ -791,14 +791,14 @@ static int ipv6_renew_option(void *ohdr, | |||
791 | if (ohdr) { | 791 | if (ohdr) { |
792 | memcpy(*p, ohdr, ipv6_optlen((struct ipv6_opt_hdr *)ohdr)); | 792 | memcpy(*p, ohdr, ipv6_optlen((struct ipv6_opt_hdr *)ohdr)); |
793 | *hdr = (struct ipv6_opt_hdr *)*p; | 793 | *hdr = (struct ipv6_opt_hdr *)*p; |
794 | *p += CMSG_ALIGN(ipv6_optlen(*(struct ipv6_opt_hdr **)hdr)); | 794 | *p += CMSG_ALIGN(ipv6_optlen(*hdr)); |
795 | } | 795 | } |
796 | } else { | 796 | } else { |
797 | if (newopt) { | 797 | if (newopt) { |
798 | if (copy_from_user(*p, newopt, newoptlen)) | 798 | if (copy_from_user(*p, newopt, newoptlen)) |
799 | return -EFAULT; | 799 | return -EFAULT; |
800 | *hdr = (struct ipv6_opt_hdr *)*p; | 800 | *hdr = (struct ipv6_opt_hdr *)*p; |
801 | if (ipv6_optlen(*(struct ipv6_opt_hdr **)hdr) > newoptlen) | 801 | if (ipv6_optlen(*hdr) > newoptlen) |
802 | return -EINVAL; | 802 | return -EINVAL; |
803 | *p += CMSG_ALIGN(newoptlen); | 803 | *p += CMSG_ALIGN(newoptlen); |
804 | } | 804 | } |
diff --git a/net/irda/irqueue.c b/net/irda/irqueue.c index f06947c4fa82..7152624ed5f1 100644 --- a/net/irda/irqueue.c +++ b/net/irda/irqueue.c | |||
@@ -523,7 +523,7 @@ void *hashbin_remove_first( hashbin_t *hashbin) | |||
523 | * Dequeue the entry... | 523 | * Dequeue the entry... |
524 | */ | 524 | */ |
525 | dequeue_general( (irda_queue_t**) &hashbin->hb_queue[ bin ], | 525 | dequeue_general( (irda_queue_t**) &hashbin->hb_queue[ bin ], |
526 | (irda_queue_t*) entry ); | 526 | entry); |
527 | hashbin->hb_size--; | 527 | hashbin->hb_size--; |
528 | entry->q_next = NULL; | 528 | entry->q_next = NULL; |
529 | entry->q_prev = NULL; | 529 | entry->q_prev = NULL; |
@@ -615,7 +615,7 @@ void* hashbin_remove( hashbin_t* hashbin, long hashv, const char* name) | |||
615 | */ | 615 | */ |
616 | if ( found ) { | 616 | if ( found ) { |
617 | dequeue_general( (irda_queue_t**) &hashbin->hb_queue[ bin ], | 617 | dequeue_general( (irda_queue_t**) &hashbin->hb_queue[ bin ], |
618 | (irda_queue_t*) entry ); | 618 | entry); |
619 | hashbin->hb_size--; | 619 | hashbin->hb_size--; |
620 | 620 | ||
621 | /* | 621 | /* |
@@ -685,7 +685,7 @@ void* hashbin_remove_this( hashbin_t* hashbin, irda_queue_t* entry) | |||
685 | * Dequeue the entry... | 685 | * Dequeue the entry... |
686 | */ | 686 | */ |
687 | dequeue_general( (irda_queue_t**) &hashbin->hb_queue[ bin ], | 687 | dequeue_general( (irda_queue_t**) &hashbin->hb_queue[ bin ], |
688 | (irda_queue_t*) entry ); | 688 | entry); |
689 | hashbin->hb_size--; | 689 | hashbin->hb_size--; |
690 | entry->q_next = NULL; | 690 | entry->q_next = NULL; |
691 | entry->q_prev = NULL; | 691 | entry->q_prev = NULL; |
diff --git a/net/l2tp/l2tp_ppp.c b/net/l2tp/l2tp_ppp.c index 8ef6b9416cba..286366ef8930 100644 --- a/net/l2tp/l2tp_ppp.c +++ b/net/l2tp/l2tp_ppp.c | |||
@@ -1522,8 +1522,8 @@ static int pppol2tp_session_getsockopt(struct sock *sk, | |||
1522 | * handler, according to whether the PPPoX socket is a for a regular session | 1522 | * handler, according to whether the PPPoX socket is a for a regular session |
1523 | * or the special tunnel type. | 1523 | * or the special tunnel type. |
1524 | */ | 1524 | */ |
1525 | static int pppol2tp_getsockopt(struct socket *sock, int level, | 1525 | static int pppol2tp_getsockopt(struct socket *sock, int level, int optname, |
1526 | int optname, char __user *optval, int __user *optlen) | 1526 | char __user *optval, int __user *optlen) |
1527 | { | 1527 | { |
1528 | struct sock *sk = sock->sk; | 1528 | struct sock *sk = sock->sk; |
1529 | struct l2tp_session *session; | 1529 | struct l2tp_session *session; |
@@ -1535,7 +1535,7 @@ static int pppol2tp_getsockopt(struct socket *sock, int level, | |||
1535 | if (level != SOL_PPPOL2TP) | 1535 | if (level != SOL_PPPOL2TP) |
1536 | return udp_prot.getsockopt(sk, level, optname, optval, optlen); | 1536 | return udp_prot.getsockopt(sk, level, optname, optval, optlen); |
1537 | 1537 | ||
1538 | if (get_user(len, (int __user *) optlen)) | 1538 | if (get_user(len, optlen)) |
1539 | return -EFAULT; | 1539 | return -EFAULT; |
1540 | 1540 | ||
1541 | len = min_t(unsigned int, len, sizeof(int)); | 1541 | len = min_t(unsigned int, len, sizeof(int)); |
@@ -1568,7 +1568,7 @@ static int pppol2tp_getsockopt(struct socket *sock, int level, | |||
1568 | err = pppol2tp_session_getsockopt(sk, session, optname, &val); | 1568 | err = pppol2tp_session_getsockopt(sk, session, optname, &val); |
1569 | 1569 | ||
1570 | err = -EFAULT; | 1570 | err = -EFAULT; |
1571 | if (put_user(len, (int __user *) optlen)) | 1571 | if (put_user(len, optlen)) |
1572 | goto end_put_sess; | 1572 | goto end_put_sess; |
1573 | 1573 | ||
1574 | if (copy_to_user((void __user *) optval, &val, len)) | 1574 | if (copy_to_user((void __user *) optval, &val, len)) |
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c index 169da0742c81..6d90a562669f 100644 --- a/net/mac80211/scan.c +++ b/net/mac80211/scan.c | |||
@@ -114,8 +114,7 @@ ieee80211_bss_info_update(struct ieee80211_local *local, | |||
114 | 114 | ||
115 | if (elems->tim && (!elems->parse_error || | 115 | if (elems->tim && (!elems->parse_error || |
116 | !(bss->valid_data & IEEE80211_BSS_VALID_DTIM))) { | 116 | !(bss->valid_data & IEEE80211_BSS_VALID_DTIM))) { |
117 | struct ieee80211_tim_ie *tim_ie = | 117 | struct ieee80211_tim_ie *tim_ie = elems->tim; |
118 | (struct ieee80211_tim_ie *)elems->tim; | ||
119 | bss->dtim_period = tim_ie->dtim_period; | 118 | bss->dtim_period = tim_ie->dtim_period; |
120 | if (!elems->parse_error) | 119 | if (!elems->parse_error) |
121 | bss->valid_data |= IEEE80211_BSS_VALID_DTIM; | 120 | bss->valid_data |= IEEE80211_BSS_VALID_DTIM; |
diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c index ac3af97cc468..95976a593b98 100644 --- a/net/netfilter/nf_conntrack_core.c +++ b/net/netfilter/nf_conntrack_core.c | |||
@@ -531,7 +531,7 @@ __nf_conntrack_confirm(struct sk_buff *skb) | |||
531 | tstamp = nf_conn_tstamp_find(ct); | 531 | tstamp = nf_conn_tstamp_find(ct); |
532 | if (tstamp) { | 532 | if (tstamp) { |
533 | if (skb->tstamp.tv64 == 0) | 533 | if (skb->tstamp.tv64 == 0) |
534 | __net_timestamp((struct sk_buff *)skb); | 534 | __net_timestamp(skb); |
535 | 535 | ||
536 | tstamp->start = ktime_to_ns(skb->tstamp); | 536 | tstamp->start = ktime_to_ns(skb->tstamp); |
537 | } | 537 | } |
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c index 0f661745df0f..71ac6559e0c6 100644 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c | |||
@@ -592,7 +592,7 @@ static void init_prb_bdqc(struct packet_sock *po, | |||
592 | p1->knxt_seq_num = 1; | 592 | p1->knxt_seq_num = 1; |
593 | p1->pkbdq = pg_vec; | 593 | p1->pkbdq = pg_vec; |
594 | pbd = (struct tpacket_block_desc *)pg_vec[0].buffer; | 594 | pbd = (struct tpacket_block_desc *)pg_vec[0].buffer; |
595 | p1->pkblk_start = (char *)pg_vec[0].buffer; | 595 | p1->pkblk_start = pg_vec[0].buffer; |
596 | p1->kblk_size = req_u->req3.tp_block_size; | 596 | p1->kblk_size = req_u->req3.tp_block_size; |
597 | p1->knum_blocks = req_u->req3.tp_block_nr; | 597 | p1->knum_blocks = req_u->req3.tp_block_nr; |
598 | p1->hdrlen = po->tp_hdrlen; | 598 | p1->hdrlen = po->tp_hdrlen; |
@@ -824,8 +824,7 @@ static void prb_open_block(struct tpacket_kbdq_core *pkc1, | |||
824 | h1->ts_first_pkt.ts_sec = ts.tv_sec; | 824 | h1->ts_first_pkt.ts_sec = ts.tv_sec; |
825 | h1->ts_first_pkt.ts_nsec = ts.tv_nsec; | 825 | h1->ts_first_pkt.ts_nsec = ts.tv_nsec; |
826 | pkc1->pkblk_start = (char *)pbd1; | 826 | pkc1->pkblk_start = (char *)pbd1; |
827 | pkc1->nxt_offset = (char *)(pkc1->pkblk_start + | 827 | pkc1->nxt_offset = pkc1->pkblk_start + BLK_PLUS_PRIV(pkc1->blk_sizeof_priv); |
828 | BLK_PLUS_PRIV(pkc1->blk_sizeof_priv)); | ||
829 | BLOCK_O2FP(pbd1) = (__u32)BLK_PLUS_PRIV(pkc1->blk_sizeof_priv); | 828 | BLOCK_O2FP(pbd1) = (__u32)BLK_PLUS_PRIV(pkc1->blk_sizeof_priv); |
830 | BLOCK_O2PRIV(pbd1) = BLK_HDR_LEN; | 829 | BLOCK_O2PRIV(pbd1) = BLK_HDR_LEN; |
831 | pbd1->version = pkc1->version; | 830 | pbd1->version = pkc1->version; |
@@ -1018,7 +1017,7 @@ static void *__packet_lookup_frame_in_block(struct packet_sock *po, | |||
1018 | struct tpacket_block_desc *pbd; | 1017 | struct tpacket_block_desc *pbd; |
1019 | char *curr, *end; | 1018 | char *curr, *end; |
1020 | 1019 | ||
1021 | pkc = GET_PBDQC_FROM_RB(((struct packet_ring_buffer *)&po->rx_ring)); | 1020 | pkc = GET_PBDQC_FROM_RB(&po->rx_ring); |
1022 | pbd = GET_CURR_PBLOCK_DESC_FROM_CORE(pkc); | 1021 | pbd = GET_CURR_PBLOCK_DESC_FROM_CORE(pkc); |
1023 | 1022 | ||
1024 | /* Queue is frozen when user space is lagging behind */ | 1023 | /* Queue is frozen when user space is lagging behind */ |
@@ -1044,7 +1043,7 @@ static void *__packet_lookup_frame_in_block(struct packet_sock *po, | |||
1044 | smp_mb(); | 1043 | smp_mb(); |
1045 | curr = pkc->nxt_offset; | 1044 | curr = pkc->nxt_offset; |
1046 | pkc->skb = skb; | 1045 | pkc->skb = skb; |
1047 | end = (char *) ((char *)pbd + pkc->kblk_size); | 1046 | end = (char *)pbd + pkc->kblk_size; |
1048 | 1047 | ||
1049 | /* first try the current block */ | 1048 | /* first try the current block */ |
1050 | if (curr+TOTAL_PKT_LEN_INCL_ALIGN(len) < end) { | 1049 | if (curr+TOTAL_PKT_LEN_INCL_ALIGN(len) < end) { |
diff --git a/net/tipc/port.c b/net/tipc/port.c index 2ad37a4db376..a1e828989d7a 100644 --- a/net/tipc/port.c +++ b/net/tipc/port.c | |||
@@ -909,8 +909,8 @@ int tipc_createport(void *usr_handle, | |||
909 | warn("Port creation failed, no memory\n"); | 909 | warn("Port creation failed, no memory\n"); |
910 | return -ENOMEM; | 910 | return -ENOMEM; |
911 | } | 911 | } |
912 | p_ptr = (struct tipc_port *)tipc_createport_raw(NULL, port_dispatcher, | 912 | p_ptr = tipc_createport_raw(NULL, port_dispatcher, port_wakeup, |
913 | port_wakeup, importance); | 913 | importance); |
914 | if (!p_ptr) { | 914 | if (!p_ptr) { |
915 | kfree(up_ptr); | 915 | kfree(up_ptr); |
916 | return -ENOMEM; | 916 | return -ENOMEM; |
@@ -1078,8 +1078,7 @@ int tipc_disconnect_port(struct tipc_port *tp_ptr) | |||
1078 | if (tp_ptr->connected) { | 1078 | if (tp_ptr->connected) { |
1079 | tp_ptr->connected = 0; | 1079 | tp_ptr->connected = 0; |
1080 | /* let timer expire on it's own to avoid deadlock! */ | 1080 | /* let timer expire on it's own to avoid deadlock! */ |
1081 | tipc_nodesub_unsubscribe( | 1081 | tipc_nodesub_unsubscribe(&tp_ptr->subscription); |
1082 | &((struct tipc_port *)tp_ptr)->subscription); | ||
1083 | res = 0; | 1082 | res = 0; |
1084 | } else { | 1083 | } else { |
1085 | res = -ENOTCONN; | 1084 | res = -ENOTCONN; |
@@ -1099,7 +1098,7 @@ int tipc_disconnect(u32 ref) | |||
1099 | p_ptr = tipc_port_lock(ref); | 1098 | p_ptr = tipc_port_lock(ref); |
1100 | if (!p_ptr) | 1099 | if (!p_ptr) |
1101 | return -EINVAL; | 1100 | return -EINVAL; |
1102 | res = tipc_disconnect_port((struct tipc_port *)p_ptr); | 1101 | res = tipc_disconnect_port(p_ptr); |
1103 | tipc_port_unlock(p_ptr); | 1102 | tipc_port_unlock(p_ptr); |
1104 | return res; | 1103 | return res; |
1105 | } | 1104 | } |
diff --git a/net/tipc/socket.c b/net/tipc/socket.c index 5577a447f531..11a863d81421 100644 --- a/net/tipc/socket.c +++ b/net/tipc/socket.c | |||
@@ -54,7 +54,7 @@ struct tipc_sock { | |||
54 | }; | 54 | }; |
55 | 55 | ||
56 | #define tipc_sk(sk) ((struct tipc_sock *)(sk)) | 56 | #define tipc_sk(sk) ((struct tipc_sock *)(sk)) |
57 | #define tipc_sk_port(sk) ((struct tipc_port *)(tipc_sk(sk)->p)) | 57 | #define tipc_sk_port(sk) (tipc_sk(sk)->p) |
58 | 58 | ||
59 | #define tipc_rx_ready(sock) (!skb_queue_empty(&sock->sk->sk_receive_queue) || \ | 59 | #define tipc_rx_ready(sock) (!skb_queue_empty(&sock->sk->sk_receive_queue) || \ |
60 | (sock->state == SS_DISCONNECTING)) | 60 | (sock->state == SS_DISCONNECTING)) |