diff options
| author | Naoya Horiguchi <[email protected]> | 2018-08-23 17:00:42 -0700 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2018-08-23 18:48:43 -0700 |
| commit | d4ae9916ea2947341180d2b538f48875ff393a86 (patch) | |
| tree | e478e5e6e84de25fade8f2995c9ee49cacd5a488 /include/linux/fpga/fpga-mgr.h | |
| parent | 6bc9b56433b76e40d11099338d27fbc5cd2935ca (diff) | |
mm: soft-offline: close the race against page allocation
A process can be killed with SIGBUS(BUS_MCEERR_AR) when it tries to
allocate a page that was just freed on the way of soft-offline. This is
undesirable because soft-offline (which is about corrected error) is
less aggressive than hard-offline (which is about uncorrected error),
and we can make soft-offline fail and keep using the page for good
reason like "system is busy."
Two main changes of this patch are:
- setting migrate type of the target page to MIGRATE_ISOLATE. As done
in free_unref_page_commit(), this makes kernel bypass pcplist when
freeing the page. So we can assume that the page is in freelist just
after put_page() returns,
- setting PG_hwpoison on free page under zone->lock which protects
freelists, so this allows us to avoid setting PG_hwpoison on a page
that is decided to be allocated soon.
[[email protected]: tweak set_hwpoison_free_buddy_page() comment]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Naoya Horiguchi <[email protected]>
Reported-by: Xishi Qiu <[email protected]>
Tested-by: Mike Kravetz <[email protected]>
Cc: Michal Hocko <[email protected]>
Cc: <[email protected]>
Cc: Mike Kravetz <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'include/linux/fpga/fpga-mgr.h')
0 files changed, 0 insertions, 0 deletions