]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
uprobes: __copy_insn() should ensure a_ops->readpage != NULL
authorOleg Nesterov <oleg@redhat.com>
Fri, 15 Jun 2012 15:43:25 +0000 (17:43 +0200)
committerIngo Molnar <mingo@kernel.org>
Sat, 16 Jun 2012 07:10:42 +0000 (09:10 +0200)
commitcc359d180fa9c25a4c1819f17e07a422d788353d
tree98a70566b1bba99878990b9ac5143b3778bdff0b
parentea131377148cdfe90641b42ae9aa5a6b3a4fa327
uprobes: __copy_insn() should ensure a_ops->readpage != NULL

__copy_insn() blindly calls read_mapping_page(), this will crash
the kernel if ->readpage == NULL, add the necessary check. For
example, hugetlbfs_aops->readpage is NULL. Perhaps we should
change read_mapping_page() instead.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Cc: Anton Arapov <anton@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20120615154325.GA9568@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/events/uprobes.c