Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 146118
b: refs/heads/master
c: c78a395
h: refs/heads/master
v: v3
  • Loading branch information
Markus Metzger authored and Ingo Molnar committed Mar 19, 2009
1 parent 1a8f28b commit 7435ab2
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 79258a354e0c69be94ae2871809a195bf4a647b1
refs/heads/master: c78a3956b982418186e40978a51636a2b43221bc
21 changes: 17 additions & 4 deletions trunk/arch/x86/kernel/ds.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,13 @@ static inline struct ds_context *ds_get_context(struct task_struct *task)
struct ds_context *new_context = NULL;
unsigned long irq;

/* Chances are small that we already have a context. */
new_context = kzalloc(sizeof(*new_context), GFP_KERNEL);
/*
* Chances are small that we already have a context.
*
* Contexts for per-cpu tracing are allocated using
* smp_call_function(). We must not sleep.
*/
new_context = kzalloc(sizeof(*new_context), GFP_ATOMIC);
if (!new_context)
return NULL;

Expand Down Expand Up @@ -662,8 +667,12 @@ struct bts_tracer *ds_request_bts(struct task_struct *task,
if (ovfl)
goto out;

/*
* Per-cpu tracing is typically requested using smp_call_function().
* We must not sleep.
*/
error = -ENOMEM;
tracer = kzalloc(sizeof(*tracer), GFP_KERNEL);
tracer = kzalloc(sizeof(*tracer), GFP_ATOMIC);
if (!tracer)
goto out;
tracer->ovfl = ovfl;
Expand Down Expand Up @@ -722,8 +731,12 @@ struct pebs_tracer *ds_request_pebs(struct task_struct *task,
if (ovfl)
goto out;

/*
* Per-cpu tracing is typically requested using smp_call_function().
* We must not sleep.
*/
error = -ENOMEM;
tracer = kzalloc(sizeof(*tracer), GFP_KERNEL);
tracer = kzalloc(sizeof(*tracer), GFP_ATOMIC);
if (!tracer)
goto out;
tracer->ovfl = ovfl;
Expand Down

0 comments on commit 7435ab2

Please sign in to comment.