aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2010-02-03 22:38:22 -0500
committerDavid S. Miller <davem@davemloft.net>2010-02-03 22:38:22 -0500
commit9c119ba54c0fcae72881948af3d37b47a2f8e1f9 (patch)
tree0be51b0bf02ece3bb32955e9d33a3998ecd57250 /net/dccp
parenta4b97f2054af2e411c414ed4cb5e1d0dbfd24a47 (diff)
parentfdd3d631cddad20ad9d3e1eb7dbf26825a8a121f (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'net/dccp')
-rw-r--r--net/dccp/ccid.c2
-rw-r--r--net/dccp/ccid.h8
-rw-r--r--net/dccp/probe.c4
3 files changed, 8 insertions, 6 deletions
diff --git a/net/dccp/ccid.c b/net/dccp/ccid.c
index 57dfb9c8c4f2..ff16e9df1969 100644
--- a/net/dccp/ccid.c
+++ b/net/dccp/ccid.c
@@ -83,7 +83,7 @@ static struct kmem_cache *ccid_kmem_cache_create(int obj_size, char *slab_name_f
83 va_list args; 83 va_list args;
84 84
85 va_start(args, fmt); 85 va_start(args, fmt);
86 vsnprintf(slab_name_fmt, sizeof(slab_name_fmt), fmt, args); 86 vsnprintf(slab_name_fmt, CCID_SLAB_NAME_LENGTH, fmt, args);
87 va_end(args); 87 va_end(args);
88 88
89 slab = kmem_cache_create(slab_name_fmt, sizeof(struct ccid) + obj_size, 0, 89 slab = kmem_cache_create(slab_name_fmt, sizeof(struct ccid) + obj_size, 0,
diff --git a/net/dccp/ccid.h b/net/dccp/ccid.h
index 269958bf7fe9..6df6f8ac9636 100644
--- a/net/dccp/ccid.h
+++ b/net/dccp/ccid.h
@@ -19,7 +19,9 @@
19#include <linux/list.h> 19#include <linux/list.h>
20#include <linux/module.h> 20#include <linux/module.h>
21 21
22#define CCID_MAX 255 22/* maximum value for a CCID (RFC 4340, 19.5) */
23#define CCID_MAX 255
24#define CCID_SLAB_NAME_LENGTH 32
23 25
24struct tcp_info; 26struct tcp_info;
25 27
@@ -49,8 +51,8 @@ struct ccid_operations {
49 const char *ccid_name; 51 const char *ccid_name;
50 struct kmem_cache *ccid_hc_rx_slab, 52 struct kmem_cache *ccid_hc_rx_slab,
51 *ccid_hc_tx_slab; 53 *ccid_hc_tx_slab;
52 char ccid_hc_rx_slab_name[32]; 54 char ccid_hc_rx_slab_name[CCID_SLAB_NAME_LENGTH];
53 char ccid_hc_tx_slab_name[32]; 55 char ccid_hc_tx_slab_name[CCID_SLAB_NAME_LENGTH];
54 __u32 ccid_hc_rx_obj_size, 56 __u32 ccid_hc_rx_obj_size,
55 ccid_hc_tx_obj_size; 57 ccid_hc_tx_obj_size;
56 /* Interface Routines */ 58 /* Interface Routines */
diff --git a/net/dccp/probe.c b/net/dccp/probe.c
index bace1d8cbcfd..f5b3464f1242 100644
--- a/net/dccp/probe.c
+++ b/net/dccp/probe.c
@@ -161,8 +161,8 @@ static __init int dccpprobe_init(void)
161 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))
162 goto err0; 162 goto err0;
163 163
164 ret = try_then_request_module((register_jprobe(&dccp_send_probe) == 0), 164 try_then_request_module((ret = register_jprobe(&dccp_send_probe)) == 0,
165 "dccp"); 165 "dccp");
166 if (ret) 166 if (ret)
167 goto err1; 167 goto err1;
168 168