|
@@ -15,11 +15,21 @@
|
|
|
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[];
|