|
@@ -1172,6 +1172,16 @@ int memory_failure(unsigned long pfn, int trapno, int flags)
|
|
|
|
|
|
lock_page(hpage);
|
|
lock_page(hpage);
|
|
|
|
|
|
|
|
+ /*
|
|
|
|
+ * The page could have changed compound pages during the locking.
|
|
|
|
+ * If this happens just bail out.
|
|
|
|
+ */
|
|
|
|
+ if (compound_head(p) != hpage) {
|
|
|
|
+ action_result(pfn, "different compound page after locking", IGNORED);
|
|
|
|
+ res = -EBUSY;
|
|
|
|
+ goto out;
|
|
|
|
+ }
|
|
|
|
+
|
|
/*
|
|
/*
|
|
* We use page flags to determine what action should be taken, but
|
|
* We use page flags to determine what action should be taken, but
|
|
* the flags can be modified by the error containment action. One
|
|
* the flags can be modified by the error containment action. One
|