* [patch 06/17] mm/mmu_notifiers: use the right return code for WARN_ON
@ 2019-11-06 5:16 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2019-11-06 5:16 UTC (permalink / raw)
To: akpm, daniel.vetter, jgg, linux-mm, mm-commits, torvalds
From: Jason Gunthorpe <jgg@mellanox.com>
Subject: 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.
Link: http://lkml.kernel.org/r/20191025175502.GA31127@ziepe.ca
Fixes: 8402ce61bec2 ("mm/mmu_notifiers: check if mmu notifier callbacks are allowed to fail")
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/mmu_notifier.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/mm/mmu_notifier.c~mm-mmu_notifiers-use-the-right-return-code-for-warn_on
+++ a/mm/mmu_notifier.c
@@ -180,7 +180,7 @@ int __mmu_notifier_invalidate_range_star
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;
}
}
_
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-11-06 5:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-06 5:16 [patch 06/17] mm/mmu_notifiers: use the right return code for WARN_ON akpm
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox