From: Davidlohr Bueso Date: Wed, 11 Sep 2013 21:26:28 +0000 (-0700) Subject: ipc, shm: guard against non-existant vma in shmdt(2) X-Git-Tag: v3.12-rc1~52^2~4 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=530fcd16d87cd2417c472a581ba5a1e501556c86;p=pandora-kernel.git ipc, shm: guard against non-existant vma in shmdt(2) When !CONFIG_MMU there's a chance we can derefence a NULL pointer when the VM area isn't found - check the return value of find_vma(). Also, remove the redundant -EINVAL return: retval is set to the proper return code and *only* changed to 0, when we actually unmap the segments. Signed-off-by: Davidlohr Bueso Cc: Sedat Dilek Cc: Rik van Riel Cc: Manfred Spraul Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed