diff options
Diffstat (limited to 'net')
| -rw-r--r-- | net/bluetooth/hidp/core.c | 2 | ||||
| -rw-r--r-- | net/bluetooth/l2cap.c | 5 | ||||
| -rw-r--r-- | net/dccp/probe.c | 20 | ||||
| -rw-r--r-- | net/ipv6/reassembly.c | 3 | ||||
| -rw-r--r-- | net/ipv6/route.c | 1 |
5 files changed, 16 insertions, 15 deletions
diff --git a/net/bluetooth/hidp/core.c b/net/bluetooth/hidp/core.c index 569750010fd3..18e7f5a43dc4 100644 --- a/net/bluetooth/hidp/core.c +++ b/net/bluetooth/hidp/core.c | |||
| @@ -770,7 +770,7 @@ static int hidp_setup_hid(struct hidp_session *session, | |||
| 770 | 770 | ||
| 771 | hid = hid_allocate_device(); | 771 | hid = hid_allocate_device(); |
| 772 | if (IS_ERR(hid)) | 772 | if (IS_ERR(hid)) |
| 773 | return PTR_ERR(session->hid); | 773 | return PTR_ERR(hid); |
| 774 | 774 | ||
| 775 | session->hid = hid; | 775 | session->hid = hid; |
| 776 | session->req = req; | 776 | session->req = req; |
diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c index 5129b88c8e5b..1120cf14a548 100644 --- a/net/bluetooth/l2cap.c +++ b/net/bluetooth/l2cap.c | |||
| @@ -1212,6 +1212,7 @@ static void l2cap_monitor_timeout(unsigned long arg) | |||
| 1212 | bh_lock_sock(sk); | 1212 | bh_lock_sock(sk); |
| 1213 | if (l2cap_pi(sk)->retry_count >= l2cap_pi(sk)->remote_max_tx) { | 1213 | if (l2cap_pi(sk)->retry_count >= l2cap_pi(sk)->remote_max_tx) { |
| 1214 | l2cap_send_disconn_req(l2cap_pi(sk)->conn, sk); | 1214 | l2cap_send_disconn_req(l2cap_pi(sk)->conn, sk); |
| 1215 | bh_unlock_sock(sk); | ||
| 1215 | return; | 1216 | return; |
| 1216 | } | 1217 | } |
| 1217 | 1218 | ||
| @@ -3435,8 +3436,8 @@ static inline int l2cap_data_channel_sframe(struct sock *sk, u16 rx_control, str | |||
| 3435 | (pi->unacked_frames > 0)) | 3436 | (pi->unacked_frames > 0)) |
| 3436 | __mod_retrans_timer(); | 3437 | __mod_retrans_timer(); |
| 3437 | 3438 | ||
| 3438 | l2cap_ertm_send(sk); | ||
| 3439 | pi->conn_state &= ~L2CAP_CONN_REMOTE_BUSY; | 3439 | pi->conn_state &= ~L2CAP_CONN_REMOTE_BUSY; |
| 3440 | l2cap_ertm_send(sk); | ||
| 3440 | } | 3441 | } |
| 3441 | break; | 3442 | break; |
| 3442 | 3443 | ||
| @@ -3471,9 +3472,9 @@ static inline int l2cap_data_channel_sframe(struct sock *sk, u16 rx_control, str | |||
| 3471 | pi->conn_state &= ~L2CAP_CONN_REMOTE_BUSY; | 3472 | pi->conn_state &= ~L2CAP_CONN_REMOTE_BUSY; |
| 3472 | 3473 | ||
| 3473 | if (rx_control & L2CAP_CTRL_POLL) { | 3474 | if (rx_control & L2CAP_CTRL_POLL) { |
| 3474 | l2cap_retransmit_frame(sk, tx_seq); | ||
| 3475 | pi->expected_ack_seq = tx_seq; | 3475 | pi->expected_ack_seq = tx_seq; |
| 3476 | l2cap_drop_acked_frames(sk); | 3476 | l2cap_drop_acked_frames(sk); |
| 3477 | l2cap_retransmit_frame(sk, tx_seq); | ||
| 3477 | l2cap_ertm_send(sk); | 3478 | l2cap_ertm_send(sk); |
| 3478 | if (pi->conn_state & L2CAP_CONN_WAIT_F) { | 3479 | if (pi->conn_state & L2CAP_CONN_WAIT_F) { |
| 3479 | pi->srej_save_reqseq = tx_seq; | 3480 | pi->srej_save_reqseq = tx_seq; |
diff --git a/net/dccp/probe.c b/net/dccp/probe.c index dc328425fa20..a1362dc8abb0 100644 --- a/net/dccp/probe.c +++ b/net/dccp/probe.c | |||
| @@ -43,7 +43,7 @@ static int bufsize = 64 * 1024; | |||
| 43 | static const char procname[] = "dccpprobe"; | 43 | static const char procname[] = "dccpprobe"; |
| 44 | 44 | ||
| 45 | static struct { | 45 | static struct { |
| 46 | struct kfifo *fifo; | 46 | struct kfifo fifo; |
| 47 | spinlock_t lock; | 47 | spinlock_t lock; |
| 48 | wait_queue_head_t wait; | 48 | wait_queue_head_t wait; |
| 49 | struct timespec tstart; | 49 | struct timespec tstart; |
| @@ -67,7 +67,7 @@ static void printl(const char *fmt, ...) | |||
| 67 | len += vscnprintf(tbuf+len, sizeof(tbuf)-len, fmt, args); | 67 | len += vscnprintf(tbuf+len, sizeof(tbuf)-len, fmt, args); |
| 68 | va_end(args); | 68 | va_end(args); |
| 69 | 69 | ||
| 70 | kfifo_put(dccpw.fifo, tbuf, len); | 70 | kfifo_in_locked(&dccpw.fifo, tbuf, len, &dccpw.lock); |
| 71 | wake_up(&dccpw.wait); | 71 | wake_up(&dccpw.wait); |
| 72 | } | 72 | } |
| 73 | 73 | ||
| @@ -109,7 +109,7 @@ static struct jprobe dccp_send_probe = { | |||
| 109 | 109 | ||
| 110 | static int dccpprobe_open(struct inode *inode, struct file *file) | 110 | static int dccpprobe_open(struct inode *inode, struct file *file) |
| 111 | { | 111 | { |
| 112 | kfifo_reset(dccpw.fifo); | 112 | kfifo_reset(&dccpw.fifo); |
| 113 | getnstimeofday(&dccpw.tstart); | 113 | getnstimeofday(&dccpw.tstart); |
| 114 | return 0; | 114 | return 0; |
| 115 | } | 115 | } |
| @@ -131,11 +131,11 @@ static ssize_t dccpprobe_read(struct file *file, char __user *buf, | |||
| 131 | return -ENOMEM; | 131 | return -ENOMEM; |
| 132 | 132 | ||
| 133 | error = wait_event_interruptible(dccpw.wait, | 133 | error = wait_event_interruptible(dccpw.wait, |
| 134 | __kfifo_len(dccpw.fifo) != 0); | 134 | kfifo_len(&dccpw.fifo) != 0); |
| 135 | if (error) | 135 | if (error) |
| 136 | goto out_free; | 136 | goto out_free; |
| 137 | 137 | ||
| 138 | cnt = kfifo_get(dccpw.fifo, tbuf, len); | 138 | cnt = kfifo_out_locked(&dccpw.fifo, tbuf, len, &dccpw.lock); |
| 139 | error = copy_to_user(buf, tbuf, cnt) ? -EFAULT : 0; | 139 | error = copy_to_user(buf, tbuf, cnt) ? -EFAULT : 0; |
| 140 | 140 | ||
| 141 | out_free: | 141 | out_free: |
| @@ -156,10 +156,8 @@ static __init int dccpprobe_init(void) | |||
| 156 | 156 | ||
| 157 | init_waitqueue_head(&dccpw.wait); | 157 | init_waitqueue_head(&dccpw.wait); |
| 158 | spin_lock_init(&dccpw.lock); | 158 | spin_lock_init(&dccpw.lock); |
| 159 | dccpw.fifo = kfifo_alloc(bufsize, GFP_KERNEL, &dccpw.lock); | 159 | if (kfifo_alloc(&dccpw.fifo, bufsize, GFP_KERNEL)) |
| 160 | if (IS_ERR(dccpw.fifo)) | 160 | return ret; |
| 161 | return PTR_ERR(dccpw.fifo); | ||
| 162 | |||
| 163 | if (!proc_net_fops_create(&init_net, procname, S_IRUSR, &dccpprobe_fops)) | 161 | if (!proc_net_fops_create(&init_net, procname, S_IRUSR, &dccpprobe_fops)) |
| 164 | goto err0; | 162 | goto err0; |
| 165 | 163 | ||
| @@ -172,14 +170,14 @@ static __init int dccpprobe_init(void) | |||
| 172 | err1: | 170 | err1: |
| 173 | proc_net_remove(&init_net, procname); | 171 | proc_net_remove(&init_net, procname); |
| 174 | err0: | 172 | err0: |
| 175 | kfifo_free(dccpw.fifo); | 173 | kfifo_free(&dccpw.fifo); |
| 176 | return ret; | 174 | return ret; |
| 177 | } | 175 | } |
| 178 | module_init(dccpprobe_init); | 176 | module_init(dccpprobe_init); |
| 179 | 177 | ||
| 180 | static __exit void dccpprobe_exit(void) | 178 | static __exit void dccpprobe_exit(void) |
| 181 | { | 179 | { |
| 182 | kfifo_free(dccpw.fifo); | 180 | kfifo_free(&dccpw.fifo); |
| 183 | proc_net_remove(&init_net, procname); | 181 | proc_net_remove(&init_net, procname); |
| 184 | unregister_jprobe(&dccp_send_probe); | 182 | unregister_jprobe(&dccp_send_probe); |
| 185 | 183 | ||
diff --git a/net/ipv6/reassembly.c b/net/ipv6/reassembly.c index 3b3a95607125..2cddea3bd6be 100644 --- a/net/ipv6/reassembly.c +++ b/net/ipv6/reassembly.c | |||
| @@ -708,7 +708,8 @@ static void ip6_frags_ns_sysctl_unregister(struct net *net) | |||
| 708 | 708 | ||
| 709 | table = net->ipv6.sysctl.frags_hdr->ctl_table_arg; | 709 | table = net->ipv6.sysctl.frags_hdr->ctl_table_arg; |
| 710 | unregister_net_sysctl_table(net->ipv6.sysctl.frags_hdr); | 710 | unregister_net_sysctl_table(net->ipv6.sysctl.frags_hdr); |
| 711 | kfree(table); | 711 | if (!net_eq(net, &init_net)) |
| 712 | kfree(table); | ||
| 712 | } | 713 | } |
| 713 | 714 | ||
| 714 | static struct ctl_table_header *ip6_ctl_header; | 715 | static struct ctl_table_header *ip6_ctl_header; |
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index db3b27303890..c2bd74c5f8d9 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c | |||
| @@ -2630,6 +2630,7 @@ struct ctl_table *ipv6_route_sysctl_init(struct net *net) | |||
| 2630 | table[6].data = &net->ipv6.sysctl.ip6_rt_gc_elasticity; | 2630 | table[6].data = &net->ipv6.sysctl.ip6_rt_gc_elasticity; |
| 2631 | table[7].data = &net->ipv6.sysctl.ip6_rt_mtu_expires; | 2631 | table[7].data = &net->ipv6.sysctl.ip6_rt_mtu_expires; |
| 2632 | table[8].data = &net->ipv6.sysctl.ip6_rt_min_advmss; | 2632 | table[8].data = &net->ipv6.sysctl.ip6_rt_min_advmss; |
| 2633 | table[9].data = &net->ipv6.sysctl.ip6_rt_gc_min_interval; | ||
| 2633 | } | 2634 | } |
| 2634 | 2635 | ||
| 2635 | return table; | 2636 | return table; |
