Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 120658
b: refs/heads/master
c: ef81ee9
h: refs/heads/master
v: v3
  • Loading branch information
David Howells authored and James Morris committed Nov 13, 2008
1 parent 2a1b8c1 commit 079a0cf
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 14 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: 92a77aac9812d5397abbe6f1920e085e50838635
refs/heads/master: ef81ee9855d6c605ed6090a8018c78572cc68b5c
2 changes: 1 addition & 1 deletion trunk/arch/ia64/kernel/mca_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ mca_handler_bh(unsigned long paddr, void *iip, unsigned long ipsr)
ia64_mlogbuf_dump();
printk(KERN_ERR "OS_MCA: process [cpu %d, pid: %d, uid: %d, "
"iip: %p, psr: 0x%lx,paddr: 0x%lx](%s) encounters MCA.\n",
raw_smp_processor_id(), current->pid, current->uid,
raw_smp_processor_id(), current->pid, current_uid(),
iip, ipsr, paddr, current->comm);

spin_lock(&mca_bh_lock);
Expand Down
23 changes: 13 additions & 10 deletions trunk/arch/ia64/kernel/perfmon.c
Original file line number Diff line number Diff line change
Expand Up @@ -2220,8 +2220,8 @@ pfm_alloc_file(pfm_context_t *ctx)
DPRINT(("new inode ino=%ld @%p\n", inode->i_ino, inode));

inode->i_mode = S_IFCHR|S_IRUGO;
inode->i_uid = current->fsuid;
inode->i_gid = current->fsgid;
inode->i_uid = current_fsuid();
inode->i_gid = current_fsgid();

sprintf(name, "[%lu]", inode->i_ino);
this.name = name;
Expand Down Expand Up @@ -2399,22 +2399,25 @@ pfm_smpl_buffer_alloc(struct task_struct *task, struct file *filp, pfm_context_t
static int
pfm_bad_permissions(struct task_struct *task)
{
uid_t uid = current_uid();
gid_t gid = current_gid();

/* inspired by ptrace_attach() */
DPRINT(("cur: uid=%d gid=%d task: euid=%d suid=%d uid=%d egid=%d sgid=%d\n",
current->uid,
current->gid,
uid,
gid,
task->euid,
task->suid,
task->uid,
task->egid,
task->sgid));

return ((current->uid != task->euid)
|| (current->uid != task->suid)
|| (current->uid != task->uid)
|| (current->gid != task->egid)
|| (current->gid != task->sgid)
|| (current->gid != task->gid)) && !capable(CAP_SYS_PTRACE);
return (uid != task->euid)
|| (uid != task->suid)
|| (uid != task->uid)
|| (gid != task->egid)
|| (gid != task->sgid)
|| (gid != task->gid)) && !capable(CAP_SYS_PTRACE);
}

static int
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/ia64/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ ia64_rt_sigreturn (struct sigscratch *scr)
si.si_errno = 0;
si.si_code = SI_KERNEL;
si.si_pid = task_pid_vnr(current);
si.si_uid = current->uid;
si.si_uid = current_uid();
si.si_addr = sc;
force_sig_info(SIGSEGV, &si, current);
return retval;
Expand Down Expand Up @@ -326,7 +326,7 @@ force_sigsegv_info (int sig, void __user *addr)
si.si_errno = 0;
si.si_code = SI_KERNEL;
si.si_pid = task_pid_vnr(current);
si.si_uid = current->uid;
si.si_uid = current_uid();
si.si_addr = addr;
force_sig_info(SIGSEGV, &si, current);
return 0;
Expand Down

0 comments on commit 079a0cf

Please sign in to comment.