Staging
v0.5.1
https://github.com/torvalds/linux
Revision 5d7e0d2bd98ef4f5a16ac9da1987ae655368dd6a authored by Andrew Morton on 05 July 2008, 08:02:01 UTC, committed by Linus Torvalds on 05 July 2008, 20:13:44 UTC
Fix some issues in pagemap_read noted by Alexey:

- initialize pagemap_walk.mm to "mm" , so the code starts working as
  advertised

- initialize ->private to "&pm" so it wouldn't immediately oops in
  pagemap_pte_hole()

- unstatic struct pagemap_walk, so two threads won't fsckup each other
  (including those started by root, including flipping ->mm when you don't
  have permissions)

- pagemap_read() contains two calls to ptrace_may_attach(), second one
  looks unneeded.

- avoid possible kmalloc(0) and integer wraparound.

Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Matt Mackall <mpm@selenic.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
[ Personally, I'd just remove the functionality entirely  - Linus ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent ca31e14
History
Tip revision: 5d7e0d2bd98ef4f5a16ac9da1987ae655368dd6a authored by Andrew Morton on 05 July 2008, 08:02:01 UTC
Fix pagemap_read() use of struct mm_walk
Tip revision: 5d7e0d2
File Mode Size
Documentation
arch
block
crypto
drivers
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
usr
virt
.gitignore -rw-r--r-- 867 bytes
.mailmap -rw-r--r-- 3.6 KB
COPYING -rw-r--r-- 18.3 KB
CREDITS -rw-r--r-- 90.6 KB
Kbuild -rw-r--r-- 2.4 KB
MAINTAINERS -rw-r--r-- 98.6 KB
Makefile -rw-r--r-- 53.8 KB
README -rw-r--r-- 16.5 KB
REPORTING-BUGS -rw-r--r-- 3.1 KB

README

back to top