Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 180733
b: refs/heads/master
c: 26b0833
h: refs/heads/master
i:
  180731: 48ef925
v: v3
  • Loading branch information
Linus Torvalds committed Feb 23, 2010
1 parent e58af1d commit 30b9bbb
Show file tree
Hide file tree
Showing 12 changed files with 41 additions and 36 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: 15cbf627abcd93c3c668d5a92d58d9fec8f953dd
refs/heads/master: 26b0833366c2521b890dfa8cb0e922be7debed37
2 changes: 2 additions & 0 deletions trunk/arch/x86/include/asm/processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,8 @@ struct thread_struct {
struct perf_event *ptrace_bps[HBP_NUM];
/* Debug status used for traps, single steps, etc... */
unsigned long debugreg6;
/* Keep track of the exact dr7 value set by the user */
unsigned long ptrace_dr7;
/* Fault info: */
unsigned long cr2;
unsigned long trap_no;
Expand Down
30 changes: 7 additions & 23 deletions trunk/arch/x86/kernel/hw_breakpoint.c
Original file line number Diff line number Diff line change
Expand Up @@ -212,25 +212,6 @@ static int arch_check_va_in_kernelspace(unsigned long va, u8 hbp_len)
return (va >= TASK_SIZE) && ((va + len - 1) >= TASK_SIZE);
}

/*
* Store a breakpoint's encoded address, length, and type.
*/
static int arch_store_info(struct perf_event *bp)
{
struct arch_hw_breakpoint *info = counter_arch_bp(bp);
/*
* For kernel-addresses, either the address or symbol name can be
* specified.
*/
if (info->name)
info->address = (unsigned long)
kallsyms_lookup_name(info->name);
if (info->address)
return 0;

return -EINVAL;
}

int arch_bp_generic_fields(int x86_len, int x86_type,
int *gen_len, int *gen_type)
{
Expand Down Expand Up @@ -362,10 +343,13 @@ int arch_validate_hwbkpt_settings(struct perf_event *bp,
return ret;
}

ret = arch_store_info(bp);

if (ret < 0)
return ret;
/*
* For kernel-addresses, either the address or symbol name can be
* specified.
*/
if (info->name)
info->address = (unsigned long)
kallsyms_lookup_name(info->name);
/*
* Check that the low-order bits of the address are appropriate
* for the alignment implied by len.
Expand Down
7 changes: 5 additions & 2 deletions trunk/arch/x86/kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@ static unsigned long ptrace_get_debugreg(struct task_struct *tsk, int n)
} else if (n == 6) {
val = thread->debugreg6;
} else if (n == 7) {
val = ptrace_get_dr7(thread->ptrace_bps);
val = thread->ptrace_dr7;
}
return val;
}
Expand Down Expand Up @@ -778,8 +778,11 @@ int ptrace_set_debugreg(struct task_struct *tsk, int n, unsigned long val)
return rc;
}
/* All that's left is DR7 */
if (n == 7)
if (n == 7) {
rc = ptrace_write_dr7(tsk, val);
if (!rc)
thread->ptrace_dr7 = val;
}

ret_path:
return rc;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/clocksource/cs5535-clockevt.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

#define DRV_NAME "cs5535-clockevt"

static int timer_irq = CONFIG_CS5535_MFGPT_DEFAULT_IRQ;
static int timer_irq;
module_param_named(irq, timer_irq, int, 0644);
MODULE_PARM_DESC(irq, "Which IRQ to use for the clock source MFGPT ticks.");

Expand Down
11 changes: 10 additions & 1 deletion trunk/drivers/video/efifb.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,17 @@ static int efifb_setcolreg(unsigned regno, unsigned red, unsigned green,
return 0;
}

static void efifb_destroy(struct fb_info *info)
{
if (info->screen_base)
iounmap(info->screen_base);
release_mem_region(info->aperture_base, info->aperture_size);
framebuffer_release(info);
}

static struct fb_ops efifb_ops = {
.owner = THIS_MODULE,
.fb_destroy = efifb_destroy,
.fb_setcolreg = efifb_setcolreg,
.fb_fillrect = cfb_fillrect,
.fb_copyarea = cfb_copyarea,
Expand Down Expand Up @@ -281,7 +290,7 @@ static int __init efifb_probe(struct platform_device *dev)
info->par = NULL;

info->aperture_base = efifb_fix.smem_start;
info->aperture_size = size_total;
info->aperture_size = size_remap;

info->screen_base = ioremap(efifb_fix.smem_start, efifb_fix.smem_len);
if (!info->screen_base) {
Expand Down
1 change: 0 additions & 1 deletion trunk/fs/exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,6 @@ int setup_arg_pages(struct linux_binprm *bprm,
* will align it up.
*/
rlim_stack = rlimit(RLIMIT_STACK) & PAGE_MASK;
rlim_stack = min(rlim_stack, stack_size);
#ifdef CONFIG_STACK_GROWSUP
if (stack_size + stack_expand > rlim_stack)
stack_base = vma->vm_start + rlim_stack;
Expand Down
11 changes: 5 additions & 6 deletions trunk/kernel/perf_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -3259,16 +3259,14 @@ static void perf_event_task_output(struct perf_event *event,
task_event->event_id.tid = perf_event_tid(event, task);
task_event->event_id.ptid = perf_event_tid(event, current);

task_event->event_id.time = perf_clock();

perf_output_put(&handle, task_event->event_id);

perf_output_end(&handle);
}

static int perf_event_task_match(struct perf_event *event)
{
if (event->state != PERF_EVENT_STATE_ACTIVE)
if (event->state < PERF_EVENT_STATE_INACTIVE)
return 0;

if (event->cpu != -1 && event->cpu != smp_processor_id())
Expand Down Expand Up @@ -3300,7 +3298,7 @@ static void perf_event_task_event(struct perf_task_event *task_event)
cpuctx = &get_cpu_var(perf_cpu_context);
perf_event_task_ctx(&cpuctx->ctx, task_event);
if (!ctx)
ctx = rcu_dereference(task_event->task->perf_event_ctxp);
ctx = rcu_dereference(current->perf_event_ctxp);
if (ctx)
perf_event_task_ctx(ctx, task_event);
put_cpu_var(perf_cpu_context);
Expand Down Expand Up @@ -3331,6 +3329,7 @@ static void perf_event_task(struct task_struct *task,
/* .ppid */
/* .tid */
/* .ptid */
.time = perf_clock(),
},
};

Expand Down Expand Up @@ -3380,7 +3379,7 @@ static void perf_event_comm_output(struct perf_event *event,

static int perf_event_comm_match(struct perf_event *event)
{
if (event->state != PERF_EVENT_STATE_ACTIVE)
if (event->state < PERF_EVENT_STATE_INACTIVE)
return 0;

if (event->cpu != -1 && event->cpu != smp_processor_id())
Expand Down Expand Up @@ -3500,7 +3499,7 @@ static void perf_event_mmap_output(struct perf_event *event,
static int perf_event_mmap_match(struct perf_event *event,
struct perf_mmap_event *mmap_event)
{
if (event->state != PERF_EVENT_STATE_ACTIVE)
if (event->state < PERF_EVENT_STATE_INACTIVE)
return 0;

if (event->cpu != -1 && event->cpu != smp_processor_id())
Expand Down
2 changes: 2 additions & 0 deletions trunk/kernel/sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ SYSCALL_DEFINE2(getpriority, int, which, int, who)
if (which > PRIO_USER || which < PRIO_PROCESS)
return -EINVAL;

rcu_read_lock();
read_lock(&tasklist_lock);
switch (which) {
case PRIO_PROCESS:
Expand Down Expand Up @@ -267,6 +268,7 @@ SYSCALL_DEFINE2(getpriority, int, which, int, who)
}
out_unlock:
read_unlock(&tasklist_lock);
rcu_read_unlock();

return retval;
}
Expand Down
4 changes: 3 additions & 1 deletion trunk/lib/idr.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,12 @@ static int sub_alloc(struct idr *idp, int *starting_id, struct idr_layer **pa)
id = (id | ((1 << (IDR_BITS * l)) - 1)) + 1;

/* if already at the top layer, we need to grow */
if (!(p = pa[l])) {
if (id >= 1 << (idp->layers * IDR_BITS)) {
*starting_id = id;
return IDR_NEED_TO_GROW;
}
p = pa[l];
BUG_ON(!p);

/* If we need to go up one layer, continue the
* loop; otherwise, restart from the top.
Expand Down
2 changes: 2 additions & 0 deletions trunk/mm/oom_kill.c
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,8 @@ static int oom_kill_process(struct task_struct *p, gfp_t gfp_mask, int order,
list_for_each_entry(c, &p->children, sibling) {
if (c->mm == p->mm)
continue;
if (mem && !task_in_mem_cgroup(c, mem))
continue;
if (!oom_kill_task(c))
return 0;
}
Expand Down
3 changes: 3 additions & 0 deletions trunk/tools/perf/util/probe-event.c
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ int synthesize_perf_probe_point(struct probe_point *pp)
int ret;

pp->probes[0] = buf = zalloc(MAX_CMDLEN);
pp->found = 1;
if (!buf)
die("Failed to allocate memory by zalloc.");
if (pp->offset) {
Expand All @@ -294,6 +295,7 @@ int synthesize_perf_probe_point(struct probe_point *pp)
error:
free(pp->probes[0]);
pp->probes[0] = NULL;
pp->found = 0;
}
return ret;
}
Expand Down Expand Up @@ -455,6 +457,7 @@ void show_perf_probe_events(void)
struct strlist *rawlist;
struct str_node *ent;

memset(&pp, 0, sizeof(pp));
fd = open_kprobe_events(O_RDONLY, 0);
rawlist = get_trace_kprobe_event_rawlist(fd);
close(fd);
Expand Down

0 comments on commit 30b9bbb

Please sign in to comment.