Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755021AbbBFUe3 (ORCPT ); Fri, 6 Feb 2015 15:34:29 -0500 Received: from mx1.redhat.com ([209.132.183.28]:53548 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751877AbbBFUe2 (ORCPT ); Fri, 6 Feb 2015 15:34:28 -0500 Date: Fri, 6 Feb 2015 21:32:46 +0100 From: Oleg Nesterov To: Konstantin Khlebnikov , Johannes Weiner , Michal Hocko , KAMEZAWA Hiroyuki , KOSAKI Motohiro Cc: linux-api@vger.kernel.org, Andrew Morton , Linus Torvalds , linux-kernel@vger.kernel.org, Roman Gushchin , Nikita Vetoshkin , Pavel Emelyanov Subject: memcg && uaccess (Was: [PATCH 1/2] kernel/fork: handle put_user errors for CLONE_CHILD_SETTID/CLEARTID) Message-ID: <20150206203246.GA16924@redhat.com> References: <20150206162301.18031.32251.stgit@buzz> <20150206194405.GA13960@redhat.com> <20150206195529.GA15517@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150206195529.GA15517@redhat.com> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 925 Lines: 27 Add cc's. On 02/06, Oleg Nesterov wrote: > > And in fact I think that this is not set_child_tid/etc-specific. Perhaps > I am totally confused, but I think that put_user() simply should not fail > this way. Say, why a syscall should return -EFAULT if memory allocation > "silently" fails? Confused. Seriously. I must have missed something, but I can't understand 519e52473eb "mm: memcg: enable memcg OOM killer only for user faults". The changelog says: System calls and kernel faults (uaccess, gup) can handle an out of memory situation gracefully and just return -ENOMEM. How can a system call know it should return -ENOMEM if put_user() can only return -EFAULT ? Oleg. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/