From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S266257AbUIABgu (ORCPT ); Tue, 31 Aug 2004 21:36:50 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S266324AbUIABgu (ORCPT ); Tue, 31 Aug 2004 21:36:50 -0400 Received: from omx3-ext.sgi.com ([192.48.171.20]:11747 "EHLO omx3.sgi.com") by vger.kernel.org with ESMTP id S266257AbUIABgt (ORCPT ); Tue, 31 Aug 2004 21:36:49 -0400 Date: Tue, 31 Aug 2004 18:36:55 -0700 From: Paul Jackson To: Andi Kleen Cc: akpm@osdl.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] Fix argument checking in sched_setaffinity Message-Id: <20040831183655.58d784a3.pj@sgi.com> In-Reply-To: References: Organization: SGI X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Looks good - thanks, Andi. I notice that you didn't bother with the fractional byte that is handled by 'endmask' in mm/mempolicy.c:get_nodes(). But I really don't give a hoot - either way is fine by me. I've written a couple of code snippets that manage to intuit the size of the kernel's cpumask dynamically from user space, by probing with various sched_getaffinity() calls. But since your patch only changes the errors generated by sched_setaffinity() [that's "set", not "get"], I will not experience any grief from this subtle change in the kernel's API. Should you lock hotplug before calling get_user_cpu_mask(), since get_user_cpu_mask() depends on cpu_online_mask()? -- I won't rest till it's the best ... Programmer, Linux Scalability Paul Jackson 1.650.933.1373