Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 296429
b: refs/heads/master
c: c2220b2
h: refs/heads/master
i:
  296427: d755a43
v: v3
  • Loading branch information
Al Viro authored and Richard Weinberger committed Mar 24, 2012
1 parent 770e8bf commit da9c2a3
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 9 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: 28a12cb598e55ca9e1c577899d6624e6a83cdc56
refs/heads/master: c2220b2a124d2fe7b0074b23680177c8e905a76c
2 changes: 0 additions & 2 deletions trunk/arch/um/include/shared/common-offsets.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

DEFINE(KERNEL_MADV_REMOVE, MADV_REMOVE);

OFFSET(HOST_TASK_PID, task_struct, pid);

DEFINE(UM_KERN_PAGE_SIZE, PAGE_SIZE);
DEFINE(UM_KERN_PAGE_MASK, PAGE_MASK);
DEFINE(UM_KERN_PAGE_SHIFT, PAGE_SHIFT);
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/um/include/shared/kern_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ extern void do_uml_exitcalls(void);
* GFP_ATOMIC.
*/
extern int __cant_sleep(void);
extern void *get_current(void);
extern int get_current_pid(void);
extern int copy_from_user_proc(void *to, void *from, int size);
extern int cpu(void);
extern char *uml_strdup(const char *string);
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/um/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,9 @@ void exit_thread(void)
{
}

void *get_current(void)
int get_current_pid(void)
{
return current;
return task_pid_nr(current);
}

/*
Expand Down
4 changes: 1 addition & 3 deletions trunk/arch/x86/um/bugs_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
static int host_has_cmov = 1;
static jmp_buf cmov_test_return;

#define TASK_PID(task) *((int *) &(((char *) (task))[HOST_TASK_PID]))

static void cmov_sigill_test_handler(int sig)
{
host_has_cmov = 0;
Expand Down Expand Up @@ -51,7 +49,7 @@ void arch_examine_signal(int sig, struct uml_pt_regs *regs)
* This is testing for a cmov (0x0f 0x4x) instruction causing a
* SIGILL in init.
*/
if ((sig != SIGILL) || (TASK_PID(get_current()) != 1))
if ((sig != SIGILL) || (get_current_pid() != 1))
return;

if (copy_from_user_proc(tmp, (void *) UPT_IP(regs), 2)) {
Expand Down

0 comments on commit da9c2a3

Please sign in to comment.