We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 82b2077 commit 472de63Copy full SHA for 472de63
drivers/firmware/arm_sdei.c
@@ -1128,6 +1128,14 @@ int sdei_event_handler(struct pt_regs *regs,
1128
mm_segment_t orig_addr_limit;
1129
u32 event_num = arg->event_num;
1130
1131
+ /*
1132
+ * Save restore 'fs'.
1133
+ * The architecture's entry code save/restores 'fs' when taking an
1134
+ * exception from the kernel. This ensures addr_limit isn't inherited
1135
+ * if you interrupted something that allowed the uaccess routines to
1136
+ * access kernel memory.
1137
+ * Do the same here because this doesn't come via the same entry code.
1138
+ */
1139
orig_addr_limit = get_fs();
1140
set_fs(USER_DS);
1141
0 commit comments