Commit 9c17a36
mm: change vmf_anon_prepare() to __vmf_anon_prepare()
commit 2a058ab upstream.
Some callers of vmf_anon_prepare() may not want us to release the per-VMA
lock ourselves. Rename vmf_anon_prepare() to __vmf_anon_prepare() and let
the callers drop the lock when desired.
Also, make vmf_anon_prepare() a wrapper that releases the per-VMA lock
itself for any callers that don't care.
This is in preparation to fix this bug reported by syzbot:
https://lore.kernel.org/linux-mm/[email protected]/
Link: https://lkml.kernel.org/r/[email protected]
Fixes: 9acad7b ("hugetlb: use vmf_anon_prepare() instead of anon_vma_prepare()")
Reported-by: [email protected]
Closes: https://lore.kernel.org/linux-mm/[email protected]/
Signed-off-by: Vishal Moola (Oracle) <[email protected]>
Cc: Muchun Song <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>1 parent 0496611 commit 9c17a36
2 files changed
Lines changed: 13 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
310 | 310 | | |
311 | 311 | | |
312 | 312 | | |
313 | | - | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
314 | 323 | | |
315 | 324 | | |
316 | 325 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3276 | 3276 | | |
3277 | 3277 | | |
3278 | 3278 | | |
3279 | | - | |
| 3279 | + | |
3280 | 3280 | | |
3281 | 3281 | | |
3282 | 3282 | | |
| |||
3290 | 3290 | | |
3291 | 3291 | | |
3292 | 3292 | | |
3293 | | - | |
| 3293 | + | |
3294 | 3294 | | |
3295 | 3295 | | |
3296 | 3296 | | |
3297 | 3297 | | |
3298 | 3298 | | |
3299 | 3299 | | |
3300 | 3300 | | |
3301 | | - | |
3302 | | - | |
| 3301 | + | |
3303 | 3302 | | |
3304 | | - | |
3305 | 3303 | | |
3306 | 3304 | | |
3307 | 3305 | | |
| |||
0 commit comments