diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-11-22 14:16:29 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-11-22 14:16:29 -0500 |
commit | b80d60e1c3854460a1f01d4110da5ae98f30f9b2 (patch) | |
tree | 5593098d802c82c7565755f933f5c7cbe668ad0d /arch | |
parent | a2d2eda7bf8fd3a5fa44557162715dbfabbc8239 (diff) | |
parent | 441a179dafc0f99fc8b3a8268eef66958621082e (diff) |
Merge tag 'parisc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/parisc-2.6
Pull PARISC fixes from James Bottomley:
"This is two bug fixes: one fixes a loophole where rt_sigprocmask()
with the wrong values panics the box (Denial of Service) and the other
fixes an aliasing problem with get_shared_area() which could cause
data corruption.
Signed-off-by: James Bottomley <JBottomley@Parallels.com>"
* tag 'parisc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/parisc-2.6:
[PARISC] fix user-triggerable panic on parisc
[PARISC] fix virtual aliasing issue in get_shared_area()
Diffstat (limited to 'arch')
-rw-r--r-- | arch/parisc/kernel/signal32.c | 6 | ||||
-rw-r--r-- | arch/parisc/kernel/sys_parisc.c | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/arch/parisc/kernel/signal32.c b/arch/parisc/kernel/signal32.c index fd49aeda9eb8..5dede04f2f3e 100644 --- a/arch/parisc/kernel/signal32.c +++ b/arch/parisc/kernel/signal32.c | |||
@@ -65,7 +65,8 @@ put_sigset32(compat_sigset_t __user *up, sigset_t *set, size_t sz) | |||
65 | { | 65 | { |
66 | compat_sigset_t s; | 66 | compat_sigset_t s; |
67 | 67 | ||
68 | if (sz != sizeof *set) panic("put_sigset32()"); | 68 | if (sz != sizeof *set) |
69 | return -EINVAL; | ||
69 | sigset_64to32(&s, set); | 70 | sigset_64to32(&s, set); |
70 | 71 | ||
71 | return copy_to_user(up, &s, sizeof s); | 72 | return copy_to_user(up, &s, sizeof s); |
@@ -77,7 +78,8 @@ get_sigset32(compat_sigset_t __user *up, sigset_t *set, size_t sz) | |||
77 | compat_sigset_t s; | 78 | compat_sigset_t s; |
78 | int r; | 79 | int r; |
79 | 80 | ||
80 | if (sz != sizeof *set) panic("put_sigset32()"); | 81 | if (sz != sizeof *set) |
82 | return -EINVAL; | ||
81 | 83 | ||
82 | if ((r = copy_from_user(&s, up, sz)) == 0) { | 84 | if ((r = copy_from_user(&s, up, sz)) == 0) { |
83 | sigset_32to64(set, &s); | 85 | sigset_32to64(set, &s); |
diff --git a/arch/parisc/kernel/sys_parisc.c b/arch/parisc/kernel/sys_parisc.c index 7426e40699bd..f76c10863c62 100644 --- a/arch/parisc/kernel/sys_parisc.c +++ b/arch/parisc/kernel/sys_parisc.c | |||
@@ -73,6 +73,8 @@ static unsigned long get_shared_area(struct address_space *mapping, | |||
73 | struct vm_area_struct *vma; | 73 | struct vm_area_struct *vma; |
74 | int offset = mapping ? get_offset(mapping) : 0; | 74 | int offset = mapping ? get_offset(mapping) : 0; |
75 | 75 | ||
76 | offset = (offset + (pgoff << PAGE_SHIFT)) & 0x3FF000; | ||
77 | |||
76 | addr = DCACHE_ALIGN(addr - offset) + offset; | 78 | addr = DCACHE_ALIGN(addr - offset) + offset; |
77 | 79 | ||
78 | for (vma = find_vma(current->mm, addr); ; vma = vma->vm_next) { | 80 | for (vma = find_vma(current->mm, addr); ; vma = vma->vm_next) { |