lkml.org 
[lkml]   [2007]   [Mar]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    SubjectRe: [PATCH 1/2] avoid OPEN_MAX in SCM_MAX_FD
    Date
    > > -#define SCM_MAX_FD	(OPEN_MAX-1)
    > > +#define SCM_MAX_FD (NR_OPEN-1)
    >
    > This is a bad idea. [...]

    Ok. My only agenda is to get rid of OPEN_MAX.
    I then propose the following instead.


    Thanks,
    Roland

    ---
    [PATCH] avoid OPEN_MAX in SCM_MAX_FD

    The OPEN_MAX constant is an arbitrary number with no useful relation to
    anything. Nothing should be using it. SCM_MAX_FD is just an arbitrary
    constant and it should be clear that its value is chosen in net/scm.h
    and not actually derived from anything else meaningful in the system.

    Signed-off-by: Roland McGrath <roland@redhat.com>
    ---
    include/net/scm.h | 5 ++---
    1 files changed, 2 insertions(+), 3 deletions(-)

    diff --git a/include/net/scm.h b/include/net/scm.h
    index 5637d5e..2240690 100644
    --- a/include/net/scm.h
    +++ b/include/net/scm.h
    @@ -8,7 +8,7 @@
    /* Well, we should have at least one descriptor open
    * to accept passed FDs 8)
    */
    -#define SCM_MAX_FD (OPEN_MAX-1)
    +#define SCM_MAX_FD 255

    struct scm_fp_list
    {
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/
    \
     
     \ /
      Last update: 2007-03-13 21:07    [W:0.022 / U:59.112 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site