Commit 545aa52
mm, slab: Fix test failures on kernels with SLOB
In the Fixes commit, as part of the refactor, the
_identify_kernel_address() function started open-coding the
get_slab_object_info() function. Unfortunately, this resulted in the
function failing when CONFIG_SLOB was enabled, since the AttributeError
for accessing "slab.slab_cache" was not caught.
Open-coding was done to avoid the duplicate bounds check for
in_direct_map. In fact, in_direct_map seems like a useful helper itself,
and by factoring it out of _find_containing_slab() and into its callers,
we can simplify things a bit. Since _find_containing_slab() can handle
SLOB, this fixes the test failure too.
Fixes: 48e0c51 ("helper.common.memory: recognize vmap addresses in identify_address()")
Signed-off-by: Stephen Brennan <[email protected]>1 parent 46da1ca commit 545aa52
3 files changed
+27
-41
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
| 17 | + | |
26 | 18 | | |
27 | 19 | | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
| 20 | + | |
35 | 21 | | |
36 | | - | |
| 22 | + | |
37 | 23 | | |
38 | 24 | | |
39 | 25 | | |
| |||
111 | 97 | | |
112 | 98 | | |
113 | 99 | | |
114 | | - | |
115 | | - | |
116 | | - | |
| 100 | + | |
117 | 101 | | |
118 | 102 | | |
119 | 103 | | |
120 | | - | |
121 | | - | |
122 | | - | |
| 104 | + | |
123 | 105 | | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
135 | 111 | | |
136 | 112 | | |
137 | 113 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1377 | 1377 | | |
1378 | 1378 | | |
1379 | 1379 | | |
| 1380 | + | |
| 1381 | + | |
| 1382 | + | |
| 1383 | + | |
| 1384 | + | |
| 1385 | + | |
| 1386 | + | |
| 1387 | + | |
| 1388 | + | |
| 1389 | + | |
| 1390 | + | |
| 1391 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
42 | 43 | | |
43 | | - | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
464 | 464 | | |
465 | 465 | | |
466 | 466 | | |
467 | | - | |
468 | | - | |
469 | | - | |
470 | | - | |
471 | | - | |
472 | | - | |
473 | 467 | | |
474 | 468 | | |
475 | 469 | | |
| |||
516 | 510 | | |
517 | 511 | | |
518 | 512 | | |
| 513 | + | |
| 514 | + | |
519 | 515 | | |
520 | 516 | | |
521 | 517 | | |
| |||
568 | 564 | | |
569 | 565 | | |
570 | 566 | | |
| 567 | + | |
| 568 | + | |
571 | 569 | | |
572 | 570 | | |
573 | 571 | | |
| |||
0 commit comments