Commit 8731cfe5 authored by Stéphane Eranian's avatar Stéphane Eranian Committed by Tony Luck

[IA64] minor fix to perfmon

change the return value of PFM_CREATE_CONTEXT from
EAGAIN to ENOMEM when the sampling buffer size is
larger than the RLIMIT_MEMLOCK limit of the task.
signed-off-by: default avatarStephane Eranian <eranian@hpl.hp.com>
Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
parent 1f876a54
...@@ -2286,7 +2286,7 @@ pfm_smpl_buffer_alloc(struct task_struct *task, pfm_context_t *ctx, unsigned lon ...@@ -2286,7 +2286,7 @@ pfm_smpl_buffer_alloc(struct task_struct *task, pfm_context_t *ctx, unsigned lon
* if ((mm->total_vm << PAGE_SHIFT) + len> task->rlim[RLIMIT_AS].rlim_cur) * if ((mm->total_vm << PAGE_SHIFT) + len> task->rlim[RLIMIT_AS].rlim_cur)
* return -ENOMEM; * return -ENOMEM;
*/ */
if (size > task->rlim[RLIMIT_MEMLOCK].rlim_cur) return -EAGAIN; if (size > task->rlim[RLIMIT_MEMLOCK].rlim_cur) return -ENOMEM;
/* /*
* We do the easy to undo allocations first. * We do the easy to undo allocations first.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment