Commit 6d27a31
uprobes: introduce the global struct vm_special_mapping xol_mapping
Currently each xol_area has its own instance of vm_special_mapping, this
is suboptimal and ugly. Kill xol_area->xol_mapping and add a single
global instance of vm_special_mapping, the ->fault() method can use
area->pages rather than xol_mapping->pages.
As a side effect this fixes the problem introduced by the recent commit
223febc ("mm: add optional close() to struct vm_special_mapping"), if
special_mapping_close() is called from the __mmput() paths, it will use
vma->vm_private_data = &area->xol_mapping freed by uprobe_clear_state().
Link: https://lkml.kernel.org/r/[email protected]
Fixes: 223febc ("mm: add optional close() to struct vm_special_mapping")
Signed-off-by: Oleg Nesterov <[email protected]>
Reported-by: Sven Schnelle <[email protected]>
Closes: https://lore.kernel.org/all/[email protected]/
Cc: Adrian Hunter <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Andrii Nakryiko <[email protected]>
Cc: Arnaldo Carvalho de Melo <[email protected]>
Cc: Ian Rogers <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Kan Liang <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Masami Hiramatsu <[email protected]>
Cc: Michael Ellerman <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>1 parent ed8d5b0 commit 6d27a31
1 file changed
+16
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | | - | |
103 | 102 | | |
104 | 103 | | |
105 | 104 | | |
| |||
1433 | 1432 | | |
1434 | 1433 | | |
1435 | 1434 | | |
| 1435 | + | |
| 1436 | + | |
| 1437 | + | |
| 1438 | + | |
| 1439 | + | |
| 1440 | + | |
| 1441 | + | |
| 1442 | + | |
| 1443 | + | |
| 1444 | + | |
| 1445 | + | |
| 1446 | + | |
| 1447 | + | |
| 1448 | + | |
| 1449 | + | |
1436 | 1450 | | |
1437 | 1451 | | |
1438 | 1452 | | |
| |||
1459 | 1473 | | |
1460 | 1474 | | |
1461 | 1475 | | |
1462 | | - | |
| 1476 | + | |
1463 | 1477 | | |
1464 | 1478 | | |
1465 | 1479 | | |
| |||
1498 | 1512 | | |
1499 | 1513 | | |
1500 | 1514 | | |
1501 | | - | |
1502 | | - | |
1503 | | - | |
1504 | 1515 | | |
1505 | 1516 | | |
1506 | 1517 | | |
| |||
0 commit comments