~ubuntu-branches/ubuntu/precise/nginx/precise-updates

« back to all changes in this revision

Viewing changes to src/core/nginx.c

  • Committer: Package Import Robot
  • Author(s): Cyril Lavier, Cyril Lavier, Kartik Mistry
  • Date: 2012-04-13 16:58:59 UTC
  • mfrom: (4.2.48 sid)
  • Revision ID: package-import@ubuntu.com-20120413165859-ef6fkd11mudyaspr
Tags: 1.1.19-1
[Cyril Lavier]
* New upstream release.
  + Fixed a buffer overflow in the ngx_http_mp4_module. See: CVE-2012-2089
    for more details.
* debian/copyright:
  + Updated licenses.
* debian/nginx-extras.postinst, debian/nginx-full.postinst,
  debian/nginx-light.postinst, debian/nginx-naxsi.postinst:
  + Removing the debug markers. (Closes: #667894)
* debian/control, debian/rules, debian/copyright,
  debian/modules/nginx-dav-ext-module:
  + Added nginx-dav-ext-module in full and extras.
* debian/modules/naxsi:
  + Updated naxsi to the SVN snapshot (r280) to fix the licence issue with
    OpenSSL.

[Kartik Mistry]
* Misc cleanups in debian/control, debian/copyright.

Show diffs side-by-side

added added

removed removed

Lines of Context:
983
983
    ngx_conf_init_value(ccf->worker_processes, 1);
984
984
    ngx_conf_init_value(ccf->debug_points, 0);
985
985
 
986
 
#if (NGX_HAVE_SCHED_SETAFFINITY)
 
986
#if (NGX_HAVE_CPU_AFFINITY)
987
987
 
988
988
    if (ccf->cpu_affinity_n
989
989
        && ccf->cpu_affinity_n != 1
990
990
        && ccf->cpu_affinity_n != (ngx_uint_t) ccf->worker_processes)
991
991
    {
992
992
        ngx_log_error(NGX_LOG_WARN, cycle->log, 0,
993
 
                      "number of the \"worker_processes\" is not equal to "
994
 
                      "the number of the \"worker_cpu_affinity\" mask, "
 
993
                      "the number of \"worker_processes\" is not equal to "
 
994
                      "the number of \"worker_cpu_affinity\" masks, "
995
995
                      "using last mask for remaining worker processes");
996
996
    }
997
997
 
1242
1242
static char *
1243
1243
ngx_set_cpu_affinity(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
1244
1244
{
1245
 
#if (NGX_HAVE_SCHED_SETAFFINITY)
 
1245
#if (NGX_HAVE_CPU_AFFINITY)
1246
1246
    ngx_core_conf_t  *ccf = conf;
1247
1247
 
1248
1248
    u_char            ch;
1249
 
    u_long           *mask;
 
1249
    uint64_t         *mask;
1250
1250
    ngx_str_t        *value;
1251
1251
    ngx_uint_t        i, n;
1252
1252
 
1254
1254
        return "is duplicate";
1255
1255
    }
1256
1256
 
1257
 
    mask = ngx_palloc(cf->pool, (cf->args->nelts - 1) * sizeof(long));
 
1257
    mask = ngx_palloc(cf->pool, (cf->args->nelts - 1) * sizeof(uint64_t));
1258
1258
    if (mask == NULL) {
1259
1259
        return NGX_CONF_ERROR;
1260
1260
    }
1266
1266
 
1267
1267
    for (n = 1; n < cf->args->nelts; n++) {
1268
1268
 
1269
 
        if (value[n].len > 32) {
 
1269
        if (value[n].len > 64) {
1270
1270
            ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
1271
 
                         "\"worker_cpu_affinity\" supports up to 32 CPU only");
 
1271
                         "\"worker_cpu_affinity\" supports up to 64 CPUs only");
1272
1272
            return NGX_CONF_ERROR;
1273
1273
        }
1274
1274
 
1311
1311
}
1312
1312
 
1313
1313
 
1314
 
u_long
 
1314
uint64_t
1315
1315
ngx_get_cpu_affinity(ngx_uint_t n)
1316
1316
{
1317
1317
    ngx_core_conf_t  *ccf;