aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_ipv4.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-11-04 00:05:43 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-11-04 00:05:43 -0400
commit6dbbd92522a13bcd5003829cbed30bc38a3d0362 (patch)
treeb486642d7392b81d89f159d65fd556a432e78d16 /net/ipv4/tcp_ipv4.c
parentd6748066ad0e8b2514545998f8367ebb3906f299 (diff)
parente1cfb67acd5e890bbad695000d2c997bfb7f1756 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (45 commits) be2net: Add detect UE feature for Lancer be2net: Prevent CQ full condition for Lancer be2net: Fix disabling multicast promiscous mode be2net: Fix endian issue in RX filter command af_packet: de-inline some helper functions MAINTAINERS: Add can-gw include to maintained files net: Add back alignment for size for __alloc_skb net: add missing bh_unlock_sock() calls l2tp: fix race in l2tp_recv_dequeue() ixgbevf: Update release version ixgbe: DCB, return max for IEEE traffic classes ixgbe: fix reading of the buffer returned by the firmware ixgbe: Fix compiler warnings ixgbe: fix smatch splat due to missing NULL check ixgbe: fix disabling of Tx laser at probe ixgbe: Fix link issues caused by a reset while interface is down igb: Fix for I347AT4 PHY cable length unit detection e100: make sure vlan support isn't advertised on old adapters e1000e: demote a debugging WARN to a debug log message net: fix typo in drivers/net/ethernet/xilinx/ll_temac_main.c ...
Diffstat (limited to 'net/ipv4/tcp_ipv4.c')
-rw-r--r--net/ipv4/tcp_ipv4.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index 0ea10eefa60f..a7443159c400 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -1510,6 +1510,7 @@ exit:
1510 NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_LISTENDROPS); 1510 NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_LISTENDROPS);
1511 return NULL; 1511 return NULL;
1512put_and_exit: 1512put_and_exit:
1513 bh_unlock_sock(newsk);
1513 sock_put(newsk); 1514 sock_put(newsk);
1514 goto exit; 1515 goto exit;
1515} 1516}
@@ -2339,7 +2340,7 @@ static void tcp_seq_stop(struct seq_file *seq, void *v)
2339 } 2340 }
2340} 2341}
2341 2342
2342static int tcp_seq_open(struct inode *inode, struct file *file) 2343int tcp_seq_open(struct inode *inode, struct file *file)
2343{ 2344{
2344 struct tcp_seq_afinfo *afinfo = PDE(inode)->data; 2345 struct tcp_seq_afinfo *afinfo = PDE(inode)->data;
2345 struct tcp_iter_state *s; 2346 struct tcp_iter_state *s;
@@ -2355,23 +2356,19 @@ static int tcp_seq_open(struct inode *inode, struct file *file)
2355 s->last_pos = 0; 2356 s->last_pos = 0;
2356 return 0; 2357 return 0;
2357} 2358}
2359EXPORT_SYMBOL(tcp_seq_open);
2358 2360
2359int tcp_proc_register(struct net *net, struct tcp_seq_afinfo *afinfo) 2361int tcp_proc_register(struct net *net, struct tcp_seq_afinfo *afinfo)
2360{ 2362{
2361 int rc = 0; 2363 int rc = 0;
2362 struct proc_dir_entry *p; 2364 struct proc_dir_entry *p;
2363 2365
2364 afinfo->seq_fops.open = tcp_seq_open;
2365 afinfo->seq_fops.read = seq_read;
2366 afinfo->seq_fops.llseek = seq_lseek;
2367 afinfo->seq_fops.release = seq_release_net;
2368
2369 afinfo->seq_ops.start = tcp_seq_start; 2366 afinfo->seq_ops.start = tcp_seq_start;
2370 afinfo->seq_ops.next = tcp_seq_next; 2367 afinfo->seq_ops.next = tcp_seq_next;
2371 afinfo->seq_ops.stop = tcp_seq_stop; 2368 afinfo->seq_ops.stop = tcp_seq_stop;
2372 2369
2373 p = proc_create_data(afinfo->name, S_IRUGO, net->proc_net, 2370 p = proc_create_data(afinfo->name, S_IRUGO, net->proc_net,
2374 &afinfo->seq_fops, afinfo); 2371 afinfo->seq_fops, afinfo);
2375 if (!p) 2372 if (!p)
2376 rc = -ENOMEM; 2373 rc = -ENOMEM;
2377 return rc; 2374 return rc;
@@ -2520,12 +2517,18 @@ out:
2520 return 0; 2517 return 0;
2521} 2518}
2522 2519
2520static const struct file_operations tcp_afinfo_seq_fops = {
2521 .owner = THIS_MODULE,
2522 .open = tcp_seq_open,
2523 .read = seq_read,
2524 .llseek = seq_lseek,
2525 .release = seq_release_net
2526};
2527
2523static struct tcp_seq_afinfo tcp4_seq_afinfo = { 2528static struct tcp_seq_afinfo tcp4_seq_afinfo = {
2524 .name = "tcp", 2529 .name = "tcp",
2525 .family = AF_INET, 2530 .family = AF_INET,
2526 .seq_fops = { 2531 .seq_fops = &tcp_afinfo_seq_fops,
2527 .owner = THIS_MODULE,
2528 },
2529 .seq_ops = { 2532 .seq_ops = {
2530 .show = tcp4_seq_show, 2533 .show = tcp4_seq_show,
2531 }, 2534 },