lkml.org 
[lkml]   [2021]   [Mar]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] mm/oom_kill: Ensure MMU notifier range_end() is paired with range_start()
On Wed 10-03-21 20:28:07, Jason Gunthorpe wrote:
> On Wed, Mar 10, 2021 at 01:31:17PM -0800, Sean Christopherson wrote:
> > Invoke the MMU notifier's .invalidate_range_end() callbacks even if one
> > of the .invalidate_range_start() callbacks failed. If there are multiple
> > notifiers, the notifier that did not fail may have performed actions in
> > its ...start() that it expects to unwind via ...end(). Per the
> > mmu_notifier_ops documentation, ...start() and ...end() must be paired.
>
> No this is not OK, if invalidate_start returns EBUSY invalidate_end
> should *not* be called.

Yes, this is what I remember when introducing nonblock interface. So I
agree with Jason this patch is not correct. The interface is subtle but
I remember we couldn't come up with something more robust and still
memory with notifiers to be reapable.
--
Michal Hocko
SUSE Labs

\
 
 \ /
  Last update: 2021-03-11 17:21    [W:0.101 / U:0.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site