diff options
author | Paul Mundt <lethal@linux-sh.org> | 2009-12-24 01:16:02 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-12-24 01:16:02 -0500 |
commit | f34548cb735b7a80bbbb0bdd09ad4c2173ba92d5 (patch) | |
tree | e53c9e39b3149221779c10595bc59fa02de4f45f /net | |
parent | 76382b5bdb77c29ab430e1b82ef1c604c8dd113b (diff) | |
parent | 32b53076c31ce9159740b744d5eb5d9505312add (diff) |
Merge branch 'sh/g3-prep' into sh/for-2.6.33
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 | ||||
-rw-r--r-- | net/socket.c | 19 |
6 files changed, 16 insertions, 34 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; |
diff --git a/net/socket.c b/net/socket.c index dbfdfa96d29b..769c386bd428 100644 --- a/net/socket.c +++ b/net/socket.c | |||
@@ -312,18 +312,6 @@ static struct file_system_type sock_fs_type = { | |||
312 | .kill_sb = kill_anon_super, | 312 | .kill_sb = kill_anon_super, |
313 | }; | 313 | }; |
314 | 314 | ||
315 | static int sockfs_delete_dentry(struct dentry *dentry) | ||
316 | { | ||
317 | /* | ||
318 | * At creation time, we pretended this dentry was hashed | ||
319 | * (by clearing DCACHE_UNHASHED bit in d_flags) | ||
320 | * At delete time, we restore the truth : not hashed. | ||
321 | * (so that dput() can proceed correctly) | ||
322 | */ | ||
323 | dentry->d_flags |= DCACHE_UNHASHED; | ||
324 | return 0; | ||
325 | } | ||
326 | |||
327 | /* | 315 | /* |
328 | * sockfs_dname() is called from d_path(). | 316 | * sockfs_dname() is called from d_path(). |
329 | */ | 317 | */ |
@@ -334,7 +322,6 @@ static char *sockfs_dname(struct dentry *dentry, char *buffer, int buflen) | |||
334 | } | 322 | } |
335 | 323 | ||
336 | static const struct dentry_operations sockfs_dentry_operations = { | 324 | static const struct dentry_operations sockfs_dentry_operations = { |
337 | .d_delete = sockfs_delete_dentry, | ||
338 | .d_dname = sockfs_dname, | 325 | .d_dname = sockfs_dname, |
339 | }; | 326 | }; |
340 | 327 | ||
@@ -374,12 +361,6 @@ static int sock_alloc_file(struct socket *sock, struct file **f, int flags) | |||
374 | path.mnt = mntget(sock_mnt); | 361 | path.mnt = mntget(sock_mnt); |
375 | 362 | ||
376 | path.dentry->d_op = &sockfs_dentry_operations; | 363 | path.dentry->d_op = &sockfs_dentry_operations; |
377 | /* | ||
378 | * We dont want to push this dentry into global dentry hash table. | ||
379 | * We pretend dentry is already hashed, by unsetting DCACHE_UNHASHED | ||
380 | * This permits a working /proc/$pid/fd/XXX on sockets | ||
381 | */ | ||
382 | path.dentry->d_flags &= ~DCACHE_UNHASHED; | ||
383 | d_instantiate(path.dentry, SOCK_INODE(sock)); | 364 | d_instantiate(path.dentry, SOCK_INODE(sock)); |
384 | SOCK_INODE(sock)->i_fop = &socket_file_ops; | 365 | SOCK_INODE(sock)->i_fop = &socket_file_ops; |
385 | 366 | ||