@@ -1139,7 +1139,7 @@ void do_user_addr_fault(struct pt_regs *regs,
1139
1139
struct vm_area_struct * vma ;
1140
1140
struct task_struct * tsk ;
1141
1141
struct mm_struct * mm ;
1142
- vm_fault_t fault , major = 0 ;
1142
+ vm_fault_t fault ;
1143
1143
unsigned int flags = FAULT_FLAG_DEFAULT ;
1144
1144
1145
1145
tsk = current ;
@@ -1291,8 +1291,7 @@ void do_user_addr_fault(struct pt_regs *regs,
1291
1291
* userland). The return to userland is identified whenever
1292
1292
* FAULT_FLAG_USER|FAULT_FLAG_KILLABLE are both set in flags.
1293
1293
*/
1294
- fault = handle_mm_fault (vma , address , flags , NULL );
1295
- major |= fault & VM_FAULT_MAJOR ;
1294
+ fault = handle_mm_fault (vma , address , flags , regs );
1296
1295
1297
1296
/* Quick path to respond to signals */
1298
1297
if (fault_signal_pending (fault , regs )) {
@@ -1319,18 +1318,6 @@ void do_user_addr_fault(struct pt_regs *regs,
1319
1318
return ;
1320
1319
}
1321
1320
1322
- /*
1323
- * Major/minor page fault accounting. If any of the events
1324
- * returned VM_FAULT_MAJOR, we account it as a major fault.
1325
- */
1326
- if (major ) {
1327
- tsk -> maj_flt ++ ;
1328
- perf_sw_event (PERF_COUNT_SW_PAGE_FAULTS_MAJ , 1 , regs , address );
1329
- } else {
1330
- tsk -> min_flt ++ ;
1331
- perf_sw_event (PERF_COUNT_SW_PAGE_FAULTS_MIN , 1 , regs , address );
1332
- }
1333
-
1334
1321
check_v8086_mode (regs , address , tsk );
1335
1322
}
1336
1323
NOKPROBE_SYMBOL (do_user_addr_fault );
0 commit comments