From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757514AbbLBD1i (ORCPT ); Tue, 1 Dec 2015 22:27:38 -0500 Received: from mout.gmx.net ([212.227.15.19]:54283 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757483AbbLBD0w (ORCPT ); Tue, 1 Dec 2015 22:26:52 -0500 Message-ID: <1449026802.3304.9.camel@gmx.de> Subject: Re: cpuset: return -EINVAL for legacy non-subset child creation attempt From: Mike Galbraith To: Zefan Li Cc: lkml Date: Wed, 02 Dec 2015 04:26:42 +0100 In-Reply-To: <565E4744.9020308@huawei.com> References: <1448983357.3225.148.camel@gmx.de> <565E4744.9020308@huawei.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.11 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:iousQ+iUYI4ucAbXOHj70FxCtqyFkyJ1Km8J69vSW2P7IvFSjE9 iWG5kA5/JrsOtkfZej/cZN8OoLhD0jR014Msv3HZyEoNnKlCNlDdeCZNjF0jBVm8vfjwDvC 4t92I1fcPr17s0dXhAQkQ6MtEt06jbclEoI9wMPSeX+0+PKvbBELOg2KOPu240DCd4TiGmj 737+EHgYowoxQChjspVdA== X-UI-Out-Filterresults: notjunk:1;V01:K0:WToqbz7OkqQ=:23tsxb9FedYFouzsKqDLr1 tboS6R4aCxa05L/IqXZGW99AaKG/0ICGH8DOsF53HlYxmEIxAbc6+zjwHPtE2ceDis5y8BJ0b C1oV+NbRbB6wlDGiEWkFAe2NgJR8yT8PI0FTarKUIYTEPKNIpMCXowBea9iGV4h8iL7Uev+XO O9Lb0ifuizZTodcJ8cyZQ2HKMCvGgHVKXzDyZKMRfj5k/j//VbGUEU5fLby0lI9123NX5/dAE OKsmHGTVZDurWJPOn4vITxha7BnVaXk91ixW/eP5QfY75/Leb6o3GtKA3Ijwf1XE0gEsTyhBJ a9J0yn8FLCRcU3IMW2lHSRgJ4jiwfnN5rpYGbLCJGfTAlpsfoWqJRiCrtxHwBh66jy8ABblV5 iEMCB1ulU7iRSidW/D/AYLy5Bx46hOidiyRYN3EpR+6dWczz0l9mJgRGWXIl4wRzqT41CdV8k RnQRlmupf6VDZKB2502SHqGV4iUZ+V9PfM9neh9RjYO0VwTKgMrFDMAZ2tBQIXYj/E1j6eUlm PQgmxA6mnvXOJq5t7Ln9CsGimsSiJA07pNTMS77pBnXC8N/gBzj4AJP9ld+4/BkjY5n2VjBr/ F43v+rkbBBUrOw4Af5iI9hhs7I8iKMfdijqICaomzhuNCVq1RRElP397NVwdd04vQB5rn8kHN b0dpk7oGFRSksRAgIe9RyLat3aeMMEV4kTQXti0WAp9Jb3+F77XnFWzJlZ2PmMM6CMJBm0EJt jn7kg3bTuwMdla4iXSnKcDE9e3px7mtGFUEDBgkQYYFAZFK46Uk/D8RQnXb+oR2AoGrpnASYp lO7KIP+ Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2015-12-02 at 09:20 +0800, Zefan Li wrote: > On 2015/12/1 23:22, Mike Galbraith wrote: > > A legacy hierarchy child set that is not a subset of its parent is not > > a permissions issue, it's an invalid configuration. Return -EINVAL. > > > > It's sometimes arguable which errno should be used. In this case I don't > see why we can't use EACCES. It's even documented in man page. > > EACCES Attempted to add, using write(2), a CPU or memory node to a > cpuset, when that CPU or memory node was not already in its par- > ent. > > Let's see another example. In mmap manual: > > EACCES A file descriptor refers to a non-regular file. > > We can argue fd of a non-regular file is an invalid configuration, but > here we return EACCES. Ok, works for me (official -ENOPE -> gripee), thanks. -Mike