Re: [PATCH 1/2] avoid OPEN_MAX in SCM_MAX_FD

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Benjamin LaHaise
Date: Tuesday, March 13, 2007 - 7:17 am

On Tue, Mar 13, 2007 at 01:39:12AM -0700, Roland McGrath wrote:


This is a bad idea.  From linux/fs.h:

#undef NR_OPEN
#define NR_OPEN (1024*1024)     /* Absolute upper limit on fd num */

There isn't anything I can see guaranteeing that net/scm.h is included 
before fs.h.  This affects networking and should really be Cc'd to 
netdev@vger.kernel.org, which will raise the issue that if SCM_MAX_FD is 
raised, the resulting simple kmalloc() must be changed.  That said, I 
doubt SCM_MAX_FD really needs to be raised, as applications using many 
file descriptors are unlikely to try to send their entire file table to 
another process in one go -- they have to handle the limits imposed by 
SCM_MAX_FD anyways.

		-ben
-- 
"Time is of no importance, Mr. President, only life is important."
Don't Email: <zyntrop@kvack.org>.
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 1/2] avoid OPEN_MAX in SCM_MAX_FD, Roland McGrath, (Tue Mar 13, 1:39 am)
Re: [PATCH 1/2] avoid OPEN_MAX in SCM_MAX_FD, Benjamin LaHaise, (Tue Mar 13, 7:17 am)
Re: [PATCH 1/2] avoid OPEN_MAX in SCM_MAX_FD, Roland McGrath, (Tue Mar 13, 1:02 pm)
Re: [PATCH 1/2] avoid OPEN_MAX in SCM_MAX_FD, Linus Torvalds, (Tue Mar 13, 2:28 pm)
Re: [PATCH 1/2] avoid OPEN_MAX in SCM_MAX_FD, Roland McGrath, (Tue Mar 13, 5:55 pm)
Re: [PATCH 1/2] avoid OPEN_MAX in SCM_MAX_FD, Linus Torvalds, (Tue Mar 13, 6:15 pm)
Re: [PATCH 1/2] avoid OPEN_MAX in SCM_MAX_FD, Jochen Voß, (Wed Mar 14, 2:45 am)
Re: [PATCH 1/2] avoid OPEN_MAX in SCM_MAX_FD, Olaf Kirch, (Wed Mar 14, 12:52 pm)