diff --git a/mm/memory-failure.c b/mm/memory-failure.c
index 2020944398c93517df21cc7237c9a8860ce04a63..27760c19bad754d6f3281f50885d824bdf6c184a 100644
--- a/mm/memory-failure.c
+++ b/mm/memory-failure.c
@@ -1860,6 +1860,19 @@ int memory_failure(unsigned long pfn, int flags)
 	}
 
 	if (PageTransHuge(hpage)) {
+		/*
+		 * Bail out before SetPageHasHWPoisoned() if hpage is
+		 * huge_zero_page, although PG_has_hwpoisoned is not
+		 * checked in set_huge_zero_page().
+		 *
+		 * TODO: Handle memory failure of huge_zero_page thoroughly.
+		 */
+		if (is_huge_zero_page(hpage)) {
+			action_result(pfn, MF_MSG_UNSPLIT_THP, MF_IGNORED);
+			res = -EBUSY;
+			goto unlock_mutex;
+		}
+
 		/*
 		 * The flag must be set after the refcount is bumped
 		 * otherwise it may race with THP split.