summaryrefslogtreecommitdiffstats
path: root/include/net/scm.h
diff options
context:
space:
mode:
authorEric Dumazet2010-11-23 15:09:15 +0100
committerDavid S. Miller2010-11-24 20:16:43 +0100
commitbba14de98753cb6599a2dae0e520714b2153522d (patch)
treeb771ef780aa0808d3eb7827d527920c07215c4fa /include/net/scm.h
parentipv6: mcast: RCU conversion (diff)
downloadkernel-qcow2-linux-bba14de98753cb6599a2dae0e520714b2153522d.tar.gz
kernel-qcow2-linux-bba14de98753cb6599a2dae0e520714b2153522d.tar.xz
kernel-qcow2-linux-bba14de98753cb6599a2dae0e520714b2153522d.zip
scm: lower SCM_MAX_FD
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>
Diffstat (limited to 'include/net/scm.h')
-rw-r--r--include/net/scm.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/net/scm.h b/include/net/scm.h
index 31656506d967..745460fa2f02 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];
};