]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - kernel/extable.c
tracing, Text Edit Lock - kprobes architecture independent support, nommu fix
[karo-tx-linux.git] / kernel / extable.c
index 0df6253730bedff8ab66a0aa8dfbe9968db0b564..25d39b0c3a1ba4aeba990e169cfa173d32e4eba3 100644 (file)
     along with this program; if not, write to the Free Software
     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
+#include <linux/ftrace.h>
 #include <linux/module.h>
+#include <linux/mutex.h>
 #include <linux/init.h>
-#include <linux/ftrace.h>
-#include <asm/uaccess.h>
+
 #include <asm/sections.h>
+#include <asm/uaccess.h>
+
+/*
+ * mutex protecting text section modification (dynamic code patching).
+ * some users need to sleep (allocating memory...) while they hold this lock.
+ *
+ * NOT exported to modules - patching kernel text is a really delicate matter.
+ */
+DEFINE_MUTEX(text_mutex);
 
 extern struct exception_table_entry __start___ex_table[];
 extern struct exception_table_entry __stop___ex_table[];