Skip to contentSkip to conversation

mm/mmu_notifiers: use the right return code for WARN_ON

PATCH New Jason Gunthorpe 1 participant 1 message Oct 25, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mm/mmu_notifiers: use the right return code for WARN_ON

The return code from the op callback is actually in _ret, while the WARN_ON was checking ret which causes it to misfire.

Fixes 8402ce61bec2 ("mm/mmu_notifiers: check if mmu notifier callbacks are allowed to fail")
Cc Daniel Vetter <[email protected]>
---
 mm/mmu_notifier.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Andrew, could you forward this to Linus in the -rc stream? This is a new regression in v5.4-rc1, thanks

mm/mmu_notifier.c +1 -1
index 7fde88695f35d6..9a889e456168bc 100644
@@ -180,7 +180,7 @@ int __mmu_notifier_invalidate_range_start(struct mmu_notifier_range *range)
 					mn->ops->invalidate_range_start, _ret,
 					!mmu_notifier_range_blockable(range) ? "non-" : "");
 				WARN_ON(mmu_notifier_range_blockable(range) ||
-					ret != -EAGAIN);
+					_ret != -EAGAIN);
 				ret = _ret;
 			}
 		}
Signature · 1 line
2.23.0