diff options
| -rw-r--r-- | net/dccp/ccids/ccid3.c | 13 | ||||
| -rw-r--r-- | net/dccp/dccp.h | 13 | ||||
| -rw-r--r-- | net/dccp/ipv4.c | 7 | ||||
| -rw-r--r-- | net/dccp/options.c | 3 | ||||
| -rw-r--r-- | net/dccp/packet_history.h | 12 | ||||
| -rw-r--r-- | net/dccp/proto.c | 8 |
6 files changed, 32 insertions, 24 deletions
diff --git a/net/dccp/ccids/ccid3.c b/net/dccp/ccids/ccid3.c index 09274f32a337..21948d023c72 100644 --- a/net/dccp/ccids/ccid3.c +++ b/net/dccp/ccids/ccid3.c | |||
| @@ -82,12 +82,13 @@ enum ccid3_options { | |||
| 82 | 82 | ||
| 83 | static int ccid3_debug; | 83 | static int ccid3_debug; |
| 84 | 84 | ||
| 85 | struct dccp_tx_hist *ccid3_tx_hist; | 85 | static struct dccp_tx_hist *ccid3_tx_hist; |
| 86 | struct dccp_rx_hist *ccid3_rx_hist; | 86 | static struct dccp_rx_hist *ccid3_rx_hist; |
| 87 | 87 | ||
| 88 | static kmem_cache_t *ccid3_loss_interval_hist_slab; | 88 | static kmem_cache_t *ccid3_loss_interval_hist_slab; |
| 89 | 89 | ||
| 90 | static inline struct ccid3_loss_interval_hist_entry *ccid3_loss_interval_hist_entry_new(int prio) | 90 | static inline struct ccid3_loss_interval_hist_entry * |
| 91 | ccid3_loss_interval_hist_entry_new(const unsigned int __nocast prio) | ||
| 91 | { | 92 | { |
| 92 | return kmem_cache_alloc(ccid3_loss_interval_hist_slab, prio); | 93 | return kmem_cache_alloc(ccid3_loss_interval_hist_slab, prio); |
| 93 | } | 94 | } |
| @@ -1593,7 +1594,9 @@ static void ccid3_hc_rx_insert_options(struct sock *sk, struct sk_buff *skb) | |||
| 1593 | * These are integers as per section 8 of RFC3448. We can then divide by 4 * | 1594 | * These are integers as per section 8 of RFC3448. We can then divide by 4 * |
| 1594 | * when we use it. | 1595 | * when we use it. |
| 1595 | */ | 1596 | */ |
| 1596 | const int ccid3_hc_rx_w[TFRC_RECV_IVAL_F_LENGTH] = { 4, 4, 4, 4, 3, 2, 1, 1, }; | 1597 | static const int ccid3_hc_rx_w[TFRC_RECV_IVAL_F_LENGTH] = { |
| 1598 | 4, 4, 4, 4, 3, 2, 1, 1, | ||
| 1599 | }; | ||
| 1597 | 1600 | ||
| 1598 | /* | 1601 | /* |
| 1599 | * args: fvalue - function value to match | 1602 | * args: fvalue - function value to match |
| @@ -1601,7 +1604,7 @@ const int ccid3_hc_rx_w[TFRC_RECV_IVAL_F_LENGTH] = { 4, 4, 4, 4, 3, 2, 1, 1, }; | |||
| 1601 | * | 1604 | * |
| 1602 | * both fvalue and p are multiplied by 1,000,000 to use ints | 1605 | * both fvalue and p are multiplied by 1,000,000 to use ints |
| 1603 | */ | 1606 | */ |
| 1604 | u32 calcx_reverse_lookup(u32 fvalue) { | 1607 | static u32 calcx_reverse_lookup(u32 fvalue) { |
| 1605 | int ctr = 0; | 1608 | int ctr = 0; |
| 1606 | int small; | 1609 | int small; |
| 1607 | 1610 | ||
diff --git a/net/dccp/dccp.h b/net/dccp/dccp.h index 270f19439964..148e8a65a10c 100644 --- a/net/dccp/dccp.h +++ b/net/dccp/dccp.h | |||
| @@ -231,19 +231,22 @@ extern void dccp_close(struct sock *sk, long timeout); | |||
| 231 | extern struct sk_buff *dccp_make_response(struct sock *sk, | 231 | extern struct sk_buff *dccp_make_response(struct sock *sk, |
| 232 | struct dst_entry *dst, | 232 | struct dst_entry *dst, |
| 233 | struct request_sock *req); | 233 | struct request_sock *req); |
| 234 | extern struct sk_buff *dccp_make_reset(struct sock *sk, | ||
| 235 | struct dst_entry *dst, | ||
| 236 | enum dccp_reset_codes code); | ||
| 234 | 237 | ||
| 235 | extern int dccp_connect(struct sock *sk); | 238 | extern int dccp_connect(struct sock *sk); |
| 236 | extern int dccp_disconnect(struct sock *sk, int flags); | 239 | extern int dccp_disconnect(struct sock *sk, int flags); |
| 237 | extern int dccp_getsockopt(struct sock *sk, int level, int optname, | 240 | extern int dccp_getsockopt(struct sock *sk, int level, int optname, |
| 238 | char *optval, int *optlen); | 241 | char __user *optval, int __user *optlen); |
| 242 | extern int dccp_setsockopt(struct sock *sk, int level, int optname, | ||
| 243 | char __user *optval, int optlen); | ||
| 239 | extern int dccp_ioctl(struct sock *sk, int cmd, unsigned long arg); | 244 | extern int dccp_ioctl(struct sock *sk, int cmd, unsigned long arg); |
| 240 | extern int dccp_sendmsg(struct kiocb *iocb, struct sock *sk, | 245 | extern int dccp_sendmsg(struct kiocb *iocb, struct sock *sk, |
| 241 | struct msghdr *msg, size_t size); | 246 | struct msghdr *msg, size_t size); |
| 242 | extern int dccp_recvmsg(struct kiocb *iocb, struct sock *sk, | 247 | extern int dccp_recvmsg(struct kiocb *iocb, struct sock *sk, |
| 243 | struct msghdr *msg, size_t len, int nonblock, | 248 | struct msghdr *msg, size_t len, int nonblock, |
| 244 | int flags, int *addr_len); | 249 | int flags, int *addr_len); |
| 245 | extern int dccp_setsockopt(struct sock *sk, int level, int optname, | ||
| 246 | char *optval, int optlen); | ||
| 247 | extern void dccp_shutdown(struct sock *sk, int how); | 250 | extern void dccp_shutdown(struct sock *sk, int how); |
| 248 | 251 | ||
| 249 | extern int dccp_v4_checksum(const struct sk_buff *skb, | 252 | extern int dccp_v4_checksum(const struct sk_buff *skb, |
| @@ -419,7 +422,9 @@ struct dccp_ackpkts { | |||
| 419 | u8 dccpap_buf[0]; | 422 | u8 dccpap_buf[0]; |
| 420 | }; | 423 | }; |
| 421 | 424 | ||
| 422 | extern struct dccp_ackpkts *dccp_ackpkts_alloc(unsigned int len, int priority); | 425 | extern struct dccp_ackpkts * |
| 426 | dccp_ackpkts_alloc(unsigned int len, | ||
| 427 | const unsigned int __nocast priority); | ||
| 423 | extern void dccp_ackpkts_free(struct dccp_ackpkts *ap); | 428 | extern void dccp_ackpkts_free(struct dccp_ackpkts *ap); |
| 424 | extern int dccp_ackpkts_add(struct dccp_ackpkts *ap, u64 ackno, u8 state); | 429 | extern int dccp_ackpkts_add(struct dccp_ackpkts *ap, u64 ackno, u8 state); |
| 425 | extern void dccp_ackpkts_check_rcv_ackno(struct dccp_ackpkts *ap, | 430 | extern void dccp_ackpkts_check_rcv_ackno(struct dccp_ackpkts *ap, |
diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c index 42d9c878d4c3..bc3cfc0533cc 100644 --- a/net/dccp/ipv4.c +++ b/net/dccp/ipv4.c | |||
| @@ -617,9 +617,6 @@ out: | |||
| 617 | sock_put(sk); | 617 | sock_put(sk); |
| 618 | } | 618 | } |
| 619 | 619 | ||
| 620 | extern struct sk_buff *dccp_make_reset(struct sock *sk, struct dst_entry *dst, | ||
| 621 | enum dccp_reset_codes code); | ||
| 622 | |||
| 623 | int dccp_v4_send_reset(struct sock *sk, enum dccp_reset_codes code) | 620 | int dccp_v4_send_reset(struct sock *sk, enum dccp_reset_codes code) |
| 624 | { | 621 | { |
| 625 | struct sk_buff *skb; | 622 | struct sk_buff *skb; |
| @@ -881,7 +878,7 @@ static struct dst_entry* dccp_v4_route_skb(struct sock *sk, | |||
| 881 | return &rt->u.dst; | 878 | return &rt->u.dst; |
| 882 | } | 879 | } |
| 883 | 880 | ||
| 884 | void dccp_v4_ctl_send_reset(struct sk_buff *rxskb) | 881 | static void dccp_v4_ctl_send_reset(struct sk_buff *rxskb) |
| 885 | { | 882 | { |
| 886 | int err; | 883 | int err; |
| 887 | struct dccp_hdr *rxdh = dccp_hdr(rxskb), *dh; | 884 | struct dccp_hdr *rxdh = dccp_hdr(rxskb), *dh; |
| @@ -1268,7 +1265,7 @@ static int dccp_v4_init_sock(struct sock *sk) | |||
| 1268 | return 0; | 1265 | return 0; |
| 1269 | } | 1266 | } |
| 1270 | 1267 | ||
| 1271 | int dccp_v4_destroy_sock(struct sock *sk) | 1268 | static int dccp_v4_destroy_sock(struct sock *sk) |
| 1272 | { | 1269 | { |
| 1273 | struct dccp_sock *dp = dccp_sk(sk); | 1270 | struct dccp_sock *dp = dccp_sk(sk); |
| 1274 | 1271 | ||
diff --git a/net/dccp/options.c b/net/dccp/options.c index fc363aaeedaf..d87d6be7ab10 100644 --- a/net/dccp/options.c +++ b/net/dccp/options.c | |||
| @@ -499,7 +499,8 @@ void dccp_insert_options(struct sock *sk, struct sk_buff *skb) | |||
| 499 | } | 499 | } |
| 500 | } | 500 | } |
| 501 | 501 | ||
| 502 | struct dccp_ackpkts *dccp_ackpkts_alloc(unsigned int len, int priority) | 502 | struct dccp_ackpkts *dccp_ackpkts_alloc(const unsigned int len, |
| 503 | const unsigned int __nocast priority) | ||
| 503 | { | 504 | { |
| 504 | struct dccp_ackpkts *ap = kmalloc(sizeof(*ap) + len, priority); | 505 | struct dccp_ackpkts *ap = kmalloc(sizeof(*ap) + len, priority); |
| 505 | 506 | ||
diff --git a/net/dccp/packet_history.h b/net/dccp/packet_history.h index 489fff45ccdf..2e5ba343e3dd 100644 --- a/net/dccp/packet_history.h +++ b/net/dccp/packet_history.h | |||
| @@ -79,8 +79,8 @@ extern struct dccp_rx_hist_entry * | |||
| 79 | dccp_rx_hist_find_data_packet(const struct list_head *list); | 79 | dccp_rx_hist_find_data_packet(const struct list_head *list); |
| 80 | 80 | ||
| 81 | static inline struct dccp_tx_hist_entry * | 81 | static inline struct dccp_tx_hist_entry * |
| 82 | dccp_tx_hist_entry_new(struct dccp_tx_hist *hist, | 82 | dccp_tx_hist_entry_new(struct dccp_tx_hist *hist, |
| 83 | const int prio) | 83 | const unsigned int __nocast prio) |
| 84 | { | 84 | { |
| 85 | struct dccp_tx_hist_entry *entry = kmem_cache_alloc(hist->dccptxh_slab, | 85 | struct dccp_tx_hist_entry *entry = kmem_cache_alloc(hist->dccptxh_slab, |
| 86 | prio); | 86 | prio); |
| @@ -127,10 +127,10 @@ static inline struct dccp_tx_hist_entry * | |||
| 127 | } | 127 | } |
| 128 | 128 | ||
| 129 | static inline struct dccp_rx_hist_entry * | 129 | static inline struct dccp_rx_hist_entry * |
| 130 | dccp_rx_hist_entry_new(struct dccp_rx_hist *hist, | 130 | dccp_rx_hist_entry_new(struct dccp_rx_hist *hist, |
| 131 | const u32 ndp, | 131 | const u32 ndp, |
| 132 | const struct sk_buff *skb, | 132 | const struct sk_buff *skb, |
| 133 | const int prio) | 133 | const unsigned int __nocast prio) |
| 134 | { | 134 | { |
| 135 | struct dccp_rx_hist_entry *entry = kmem_cache_alloc(hist->dccprxh_slab, | 135 | struct dccp_rx_hist_entry *entry = kmem_cache_alloc(hist->dccprxh_slab, |
| 136 | prio); | 136 | prio); |
diff --git a/net/dccp/proto.c b/net/dccp/proto.c index be0669242069..0b715ceb38b5 100644 --- a/net/dccp/proto.c +++ b/net/dccp/proto.c | |||
| @@ -147,7 +147,7 @@ int dccp_ioctl(struct sock *sk, int cmd, unsigned long arg) | |||
| 147 | } | 147 | } |
| 148 | 148 | ||
| 149 | int dccp_setsockopt(struct sock *sk, int level, int optname, | 149 | int dccp_setsockopt(struct sock *sk, int level, int optname, |
| 150 | char *optval, int optlen) | 150 | char __user *optval, int optlen) |
| 151 | { | 151 | { |
| 152 | dccp_pr_debug("entry\n"); | 152 | dccp_pr_debug("entry\n"); |
| 153 | 153 | ||
| @@ -158,7 +158,7 @@ int dccp_setsockopt(struct sock *sk, int level, int optname, | |||
| 158 | } | 158 | } |
| 159 | 159 | ||
| 160 | int dccp_getsockopt(struct sock *sk, int level, int optname, | 160 | int dccp_getsockopt(struct sock *sk, int level, int optname, |
| 161 | char *optval, int *optlen) | 161 | char __user *optval, int __user *optlen) |
| 162 | { | 162 | { |
| 163 | dccp_pr_debug("entry\n"); | 163 | dccp_pr_debug("entry\n"); |
| 164 | 164 | ||
| @@ -439,7 +439,7 @@ void dccp_shutdown(struct sock *sk, int how) | |||
| 439 | dccp_pr_debug("entry\n"); | 439 | dccp_pr_debug("entry\n"); |
| 440 | } | 440 | } |
| 441 | 441 | ||
| 442 | struct proto_ops inet_dccp_ops = { | 442 | static struct proto_ops inet_dccp_ops = { |
| 443 | .family = PF_INET, | 443 | .family = PF_INET, |
| 444 | .owner = THIS_MODULE, | 444 | .owner = THIS_MODULE, |
| 445 | .release = inet_release, | 445 | .release = inet_release, |
| @@ -539,9 +539,11 @@ static int thash_entries; | |||
| 539 | module_param(thash_entries, int, 0444); | 539 | module_param(thash_entries, int, 0444); |
| 540 | MODULE_PARM_DESC(thash_entries, "Number of ehash buckets"); | 540 | MODULE_PARM_DESC(thash_entries, "Number of ehash buckets"); |
| 541 | 541 | ||
| 542 | #ifdef CONFIG_IP_DCCP_DEBUG | ||
| 542 | int dccp_debug; | 543 | int dccp_debug; |
| 543 | module_param(dccp_debug, int, 0444); | 544 | module_param(dccp_debug, int, 0444); |
| 544 | MODULE_PARM_DESC(dccp_debug, "Enable debug messages"); | 545 | MODULE_PARM_DESC(dccp_debug, "Enable debug messages"); |
| 546 | #endif | ||
| 545 | 547 | ||
| 546 | static int __init dccp_init(void) | 548 | static int __init dccp_init(void) |
| 547 | { | 549 | { |
