Re: crash during oom reaper (was: Re: [PATCH 4/4] [RFC!] mm: 'struct mm_struct' reference counting debugging)

2016-12-16 Thread Kirill A. Shutemov
On Fri, Dec 16, 2016 at 11:11:13AM +0100, Michal Hocko wrote: > On Fri 16-12-16 10:43:52, Vegard Nossum wrote: > [...] > > I don't think it's a bug in the OOM reaper itself, but either of the > > following two patches will fix the problem (without my understand how or > > why): > > > > diff --git

crash during oom reaper (was: Re: [PATCH 4/4] [RFC!] mm: 'struct mm_struct' reference counting debugging)

2016-12-16 Thread Michal Hocko
On Fri 16-12-16 10:43:52, Vegard Nossum wrote: [...] > I don't think it's a bug in the OOM reaper itself, but either of the > following two patches will fix the problem (without my understand how or > why): > > diff --git a/mm/oom_kill.c b/mm/oom_kill.c > index ec9f11d4f094..37b14b2e2af4 100644 >

[PATCH 4/4] [RFC!] mm: 'struct mm_struct' reference counting debugging

2016-12-16 Thread Vegard Nossum
Reference counting bugs are hard to debug by their nature since the actual manifestation of one can occur very far from where the error is introduced (e.g. a missing get() only manifest as a use-after-free when the reference count prematurely drops to 0, which could be arbitrarily long after where

Re: [PATCH 4/4] [RFC!] mm: 'struct mm_struct' reference counting debugging

2016-12-16 Thread Vegard Nossum
On 12/16/2016 10:01 AM, Michal Hocko wrote: On Fri 16-12-16 09:22:02, Vegard Nossum wrote: Reference counting bugs are hard to debug by their nature since the actual manifestation of one can occur very far from where the error is introduced (e.g. a missing get() only manifest as a use-after-free

Re: [PATCH 4/4] [RFC!] mm: 'struct mm_struct' reference counting debugging

2016-12-16 Thread Michal Hocko
On Fri 16-12-16 09:22:02, Vegard Nossum wrote: > Reference counting bugs are hard to debug by their nature since the actual > manifestation of one can occur very far from where the error is introduced > (e.g. a missing get() only manifest as a use-after-free when the reference > count prematurely d