Releases before v3.0-rc1:

include/asm-generic/resource.h
/*
 * boot-time rlimit defaults for the init task:
 */
#define INIT_RLIMITS                            \
{                                   \
    [RLIMIT_CPU]        = {  RLIM_INFINITY,  RLIM_INFINITY },   \
    [RLIMIT_FSIZE]      = {  RLIM_INFINITY,  RLIM_INFINITY },   \
    [RLIMIT_DATA]       = {  RLIM_INFINITY,  RLIM_INFINITY },   \
    [RLIMIT_STACK]      = {       _STK_LIM,   _STK_LIM_MAX },   \
    [RLIMIT_CORE]       = {              0,  RLIM_INFINITY },   \
    [RLIMIT_RSS]        = {  RLIM_INFINITY,  RLIM_INFINITY },   \
    [RLIMIT_NPROC]      = {              0,              0 },   \
    [RLIMIT_NOFILE]     = {       INR_OPEN,       INR_OPEN },   \
    [RLIMIT_MEMLOCK]    = {    MLOCK_LIMIT,    MLOCK_LIMIT },   \
    [RLIMIT_AS]     = {  RLIM_INFINITY,  RLIM_INFINITY },   \
    [RLIMIT_LOCKS]      = {  RLIM_INFINITY,  RLIM_INFINITY },   \
    [RLIMIT_SIGPENDING] = {         0,         0 }, \
    [RLIMIT_MSGQUEUE]   = {   MQ_BYTES_MAX,   MQ_BYTES_MAX },   \
    [RLIMIT_NICE]       = { 0, 0 },             \
    [RLIMIT_RTPRIO]     = { 0, 0 },             \
    [RLIMIT_RTTIME]     = {  RLIM_INFINITY,  RLIM_INFINITY },   \
}
include/linux/fs.h
/* Fixed constants first: */
#undef NR_OPEN
#define INR_OPEN 1024       /* Initial setting for nfile rlimits */

Releases v3.0-rc1 and above:

include/asm-generic/resource.h
/*
 * boot-time rlimit defaults for the init task:
 */
#define INIT_RLIMITS                            \
{                                   \
    [RLIMIT_CPU]        = {  RLIM_INFINITY,  RLIM_INFINITY },   \
    [RLIMIT_FSIZE]      = {  RLIM_INFINITY,  RLIM_INFINITY },   \
    [RLIMIT_DATA]       = {  RLIM_INFINITY,  RLIM_INFINITY },   \
    [RLIMIT_STACK]      = {       _STK_LIM,   _STK_LIM_MAX },   \
    [RLIMIT_CORE]       = {              0,  RLIM_INFINITY },   \
    [RLIMIT_RSS]        = {  RLIM_INFINITY,  RLIM_INFINITY },   \
    [RLIMIT_NPROC]      = {              0,              0 },   \
    [RLIMIT_NOFILE]     = {   INR_OPEN_CUR,   INR_OPEN_MAX },   \
    [RLIMIT_MEMLOCK]    = {    MLOCK_LIMIT,    MLOCK_LIMIT },   \
    [RLIMIT_AS]     = {  RLIM_INFINITY,  RLIM_INFINITY },   \
    [RLIMIT_LOCKS]      = {  RLIM_INFINITY,  RLIM_INFINITY },   \
    [RLIMIT_SIGPENDING] = {         0,         0 }, \
    [RLIMIT_MSGQUEUE]   = {   MQ_BYTES_MAX,   MQ_BYTES_MAX },   \
    [RLIMIT_NICE]       = { 0, 0 },             \
    [RLIMIT_RTPRIO]     = { 0, 0 },             \
    [RLIMIT_RTTIME]     = {  RLIM_INFINITY,  RLIM_INFINITY },   \
}
include/linux/fs.h
/* Fixed constants first: */
#undef NR_OPEN
#define INR_OPEN_CUR 1024   /* Initial setting for nfile rlimits */
#define INR_OPEN_MAX 4096   /* Hard limit for nfile rlimits */
Comments
Write a Comment