From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754078AbdGNNBP (ORCPT ); Fri, 14 Jul 2017 09:01:15 -0400 Received: from mx2.suse.de ([195.135.220.15]:53197 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753577AbdGNNBO (ORCPT ); Fri, 14 Jul 2017 09:01:14 -0400 Date: Fri, 14 Jul 2017 14:01:11 +0100 From: Mel Gorman To: Michal Hocko Cc: linux-mm@kvack.org, Andrew Morton , Johannes Weiner , Vlastimil Babka , LKML , linux-api@vger.kernel.org Subject: Re: [PATCH 1/9] mm, page_alloc: rip out ZONELIST_ORDER_ZONE Message-ID: <20170714130111.vwnddyuypd2lcyu4@suse.de> References: <20170714080006.7250-1-mhocko@kernel.org> <20170714080006.7250-2-mhocko@kernel.org> <20170714093650.l67vbem2g4typkta@suse.de> <20170714104756.GD2618@dhcp22.suse.cz> <20170714111633.gk5rpu2d5ghkbrrd@suse.de> <20170714113840.GI2618@dhcp22.suse.cz> <20170714125616.clbp4ezgtoon6cmk@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20170714125616.clbp4ezgtoon6cmk@suse.de> User-Agent: NeoMutt/20170421 (1.8.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 14, 2017 at 01:56:16PM +0100, Mel Gorman wrote: > > if (!write) { > > - int len = sizeof("Default"); > > - if (copy_to_user(buffer, "Default", len)) > > + int len = sizeof("Node"); > > + if (copy_to_user(buffer, "Node", len)) > > return -EFAULT; > > Ok for the name. But what's with using sizeof? Bah, sizeof static compile-time string versus char *. Never mind. -- Mel Gorman SUSE Labs From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mel Gorman Subject: Re: [PATCH 1/9] mm, page_alloc: rip out ZONELIST_ORDER_ZONE Date: Fri, 14 Jul 2017 14:01:11 +0100 Message-ID: <20170714130111.vwnddyuypd2lcyu4@suse.de> References: <20170714080006.7250-1-mhocko@kernel.org> <20170714080006.7250-2-mhocko@kernel.org> <20170714093650.l67vbem2g4typkta@suse.de> <20170714104756.GD2618@dhcp22.suse.cz> <20170714111633.gk5rpu2d5ghkbrrd@suse.de> <20170714113840.GI2618@dhcp22.suse.cz> <20170714125616.clbp4ezgtoon6cmk@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Return-path: Content-Disposition: inline In-Reply-To: <20170714125616.clbp4ezgtoon6cmk-l3A5Bk7waGM@public.gmane.org> Sender: linux-api-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Michal Hocko Cc: linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org, Andrew Morton , Johannes Weiner , Vlastimil Babka , LKML , linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-api@vger.kernel.org On Fri, Jul 14, 2017 at 01:56:16PM +0100, Mel Gorman wrote: > > if (!write) { > > - int len = sizeof("Default"); > > - if (copy_to_user(buffer, "Default", len)) > > + int len = sizeof("Node"); > > + if (copy_to_user(buffer, "Node", len)) > > return -EFAULT; > > Ok for the name. But what's with using sizeof? Bah, sizeof static compile-time string versus char *. Never mind. -- Mel Gorman SUSE Labs From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f70.google.com (mail-wm0-f70.google.com [74.125.82.70]) by kanga.kvack.org (Postfix) with ESMTP id 4A8D7440905 for ; Fri, 14 Jul 2017 09:01:14 -0400 (EDT) Received: by mail-wm0-f70.google.com with SMTP id b11so9106662wmh.0 for ; Fri, 14 Jul 2017 06:01:14 -0700 (PDT) Received: from mx1.suse.de (mx2.suse.de. [195.135.220.15]) by mx.google.com with ESMTPS id v17si418250wrc.379.2017.07.14.06.01.13 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 14 Jul 2017 06:01:13 -0700 (PDT) Date: Fri, 14 Jul 2017 14:01:11 +0100 From: Mel Gorman Subject: Re: [PATCH 1/9] mm, page_alloc: rip out ZONELIST_ORDER_ZONE Message-ID: <20170714130111.vwnddyuypd2lcyu4@suse.de> References: <20170714080006.7250-1-mhocko@kernel.org> <20170714080006.7250-2-mhocko@kernel.org> <20170714093650.l67vbem2g4typkta@suse.de> <20170714104756.GD2618@dhcp22.suse.cz> <20170714111633.gk5rpu2d5ghkbrrd@suse.de> <20170714113840.GI2618@dhcp22.suse.cz> <20170714125616.clbp4ezgtoon6cmk@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20170714125616.clbp4ezgtoon6cmk@suse.de> Sender: owner-linux-mm@kvack.org List-ID: To: Michal Hocko Cc: linux-mm@kvack.org, Andrew Morton , Johannes Weiner , Vlastimil Babka , LKML , linux-api@vger.kernel.org On Fri, Jul 14, 2017 at 01:56:16PM +0100, Mel Gorman wrote: > > if (!write) { > > - int len = sizeof("Default"); > > - if (copy_to_user(buffer, "Default", len)) > > + int len = sizeof("Node"); > > + if (copy_to_user(buffer, "Node", len)) > > return -EFAULT; > > Ok for the name. But what's with using sizeof? Bah, sizeof static compile-time string versus char *. Never mind. -- Mel Gorman SUSE Labs -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org