From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753038AbcFNUo1 (ORCPT ); Tue, 14 Jun 2016 16:44:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37279 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751597AbcFNUo0 (ORCPT ); Tue, 14 Jun 2016 16:44:26 -0400 Date: Tue, 14 Jun 2016 22:44:20 +0200 From: Oleg Nesterov To: Michal Hocko Cc: linux-mm@kvack.org, Tetsuo Handa , David Rientjes , Vladimir Davydov , Andrew Morton , LKML Subject: Re: [PATCH 0/10 -v4] Handle oom bypass more gracefully Message-ID: <20160614204420.GA2315@redhat.com> References: <1465473137-22531-1-git-send-email-mhocko@kernel.org> <20160613112348.GC6518@dhcp22.suse.cz> <20160613141324.GK6518@dhcp22.suse.cz> <20160614201740.GA617@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160614201740.GA617@redhat.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Tue, 14 Jun 2016 20:44:25 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/14, Oleg Nesterov wrote: > > So to me this additional patch looks fine, forgot to mention, but I think it needs another change in task_will_free_mem(), it should ignore kthreads (should not fail if we see a kthread which shares task->mm). And the comment you added on top of use_mm() looks misleading in any case. "Do not use copy_from_user from this context" looks simply wrong, why else do you need use_mm() if you are not going to do get/put_user? "because the address space might got reclaimed behind the back by the oom_reaper" doesn't look right too, copy_from_user() can also fail or read ZERO_PAGE() if mm owner does munmap/madvise. > but probably I missed something? Yes... Oleg.