Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 356323
b: refs/heads/master
c: 2e800df
h: refs/heads/master
i:
  356321: 409a2d1
  356319: c9d4d90
v: v3
  • Loading branch information
Helge Deller committed Feb 20, 2013
1 parent 9814a13 commit 3210160
Show file tree
Hide file tree
Showing 2 changed files with 12 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: bf581e15a443fa3569d9def96b512315ba509d6f
refs/heads/master: 2e800dff4f16a6e47adcbea7188fc586bfa5c30b
15 changes: 11 additions & 4 deletions trunk/arch/parisc/kernel/signal32.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ put_sigset32(compat_sigset_t __user *up, sigset_t *set, size_t sz)
{
compat_sigset_t s;

if (sz != sizeof *set)
if (sz != sizeof(compat_sigset_t))
return -EINVAL;
sigset_64to32(&s, set);

Expand All @@ -78,7 +78,7 @@ get_sigset32(compat_sigset_t __user *up, sigset_t *set, size_t sz)
compat_sigset_t s;
int r;

if (sz != sizeof *set)
if (sz != sizeof(compat_sigset_t))
return -EINVAL;

if ((r = copy_from_user(&s, up, sz)) == 0) {
Expand All @@ -94,8 +94,11 @@ int sys32_rt_sigprocmask(int how, compat_sigset_t __user *set, compat_sigset_t _
sigset_t old_set, new_set;
int ret;

if (set && get_sigset32(set, &new_set, sigsetsize))
return -EFAULT;
if (set) {
ret = get_sigset32(set, &new_set, sigsetsize);
if (ret)
return ret;
}

KERNEL_SYSCALL(ret, sys_rt_sigprocmask, how, set ? (sigset_t __user *)&new_set : NULL,
oset ? (sigset_t __user *)&old_set : NULL, sigsetsize);
Expand Down Expand Up @@ -128,6 +131,10 @@ sys32_rt_sigaction(int sig, const struct sigaction32 __user *act, struct sigacti
struct k_sigaction new_sa, old_sa;
int ret = -EINVAL;

/* XXX: Don't preclude handling different sized sigset_t's. */
if (sigsetsize != sizeof(compat_sigset_t))
return -EINVAL;

if (act) {
if (copy_from_user(&new_sa32.sa, act, sizeof new_sa32.sa))
return -EFAULT;
Expand Down

0 comments on commit 3210160

Please sign in to comment.