/proc/*/environ: wrong placing of ptrace_may_attach() check
authorAlexey Dobriyan <adobriyan@sw.ru>
Mon, 16 Jul 2007 06:40:21 +0000 (23:40 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Mon, 16 Jul 2007 16:05:44 +0000 (09:05 -0700)
commitda58a1617343e345d435953a0f32024997a95164
tree12a0ad4a92221d38dd8846f63063a8414c44655d
parent7126dd0562c78fa393a53120155e9b265cc68f9d
/proc/*/environ: wrong placing of ptrace_may_attach() check

It's a bit dopey-looking and can permit a task to cause a pagefault in an mm
which it doesn't have permission to read from.

Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/proc/base.c