diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2010-11-23 14:09:15 +0000 |
---|---|---|
committer | Paul Gortmaker <paul.gortmaker@windriver.com> | 2012-08-17 15:35:40 -0400 |
commit | 64eff52db9365f6479bb21ef1888c9aa1af7f60c (patch) | |
tree | 2ddf6ae46cd7f83b481a392fe26e2cc13fe5f157 /include | |
parent | 64fa432f97ff50be5ab64c8502b4da1062aaa43f (diff) |
scm: lower SCM_MAX_FD
commit bba14de98753cb6599a2dae0e520714b2153522d upstream.
Lower SCM_MAX_FD from 255 to 253 so that allocations for scm_fp_list are
halved. (commit f8d570a4 added two pointers in this structure)
scm_fp_dup() should not copy whole structure (and trigger kmemcheck
warnings), but only the used part. While we are at it, only allocate
needed size.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/scm.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/net/scm.h b/include/net/scm.h index 8360e47aa7e..8b5cccd9eb3 100644 --- a/include/net/scm.h +++ b/include/net/scm.h @@ -10,11 +10,12 @@ /* Well, we should have at least one descriptor open * to accept passed FDs 8) */ -#define SCM_MAX_FD 255 +#define SCM_MAX_FD 253 struct scm_fp_list { struct list_head list; - int count; + short count; + short max; struct file *fp[SCM_MAX_FD]; }; |