Re: [PATCH] oom: create a resource limit for oom_adj
From: Figo.zhang
Date: Thu Nov 11 2010 - 00:19:17 EST
> if (oom_adjust< task->signal->oom_adj&& !capable(CAP_SYS_RESOURCE)) {
> - err = -EACCES;
> - goto err_sighand;
> + /* convert oom_adj [15,-17] to rlimit style value [1,33] */
> + long oom_rlim = OOM_ADJUST_MAX + 1 - oom_adjust;
> +
> + if (oom_rlim> task->signal->rlim[RLIMIT_OOMADJ].rlim_cur) {
> + unlock_task_sighand(task,&flags);
> + put_task_struct(task);
> + err = -EACCES;
> + goto err_sighand;
> + }
> }
=> Label "err_sighand" have do that, why are you do that on here?
+ err = -EACCES;
+ goto err_sighand;
+ }
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/