Received: by 10.213.65.68 with SMTP id h4csp3939628imn; Tue, 10 Apr 2018 06:58:03 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+tV288nKIh7J5AIz89epwOP5sANGL3sAgKIs0LYHBhF4GXoOWZAmqrLJUdBx/ZYmVKPdNP X-Received: by 2002:a17:902:96a:: with SMTP id 97-v6mr571186plm.266.1523368683806; Tue, 10 Apr 2018 06:58:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523368683; cv=none; d=google.com; s=arc-20160816; b=KBJI4QsUKeIh8mN+HmgHdaSlcOxb5vMmjHewFOGiwrLGW7lvreJEkWVa+VxT/eLuOo Oq0FSrd9L0LnjtEQr31wD7gchmO6MDqdGIkhwvZlmq6SCgAx7XjNE5Qb71aqPL92HcpI 1v08Q+NMLntVFjuEhpy2D6neRRegZU/ft3btr4dVjTLyl1L1PKmEntpACjsaaud8+4EF tIR719ndhlKAvMaaY5vJ3V+ZhTOwDpaPDrYBZcyHnxoF1bhyrreb+4HjpDNWEMAvAvv4 cRRfAaowhZ3MdUwtlK2yMikoAOaXqORZv+CHO4xUOQzIYulzo0/QpjNa1/g2VW0C+Z4a cisw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=xQ40VVVm7LMI5APNJGiU1+WGdEAXOJmWyDMTcmsLYmo=; b=fJooNsKH+5KzaX0gIU9vfI5iaT1OvphutHZ/HCMvlWrKpdz9gJidKO9NAGxXXC0mrh ivoN5fQSp1CZ8D+RJY0GIERw+olpnAATXr9bh1Cc6yYQowI2fKY66w4M9Wepiasp6wxd F2VRK017xhPF+n2sj0XM4YW6y3uASI6aVes3NdomMoXoc/jCso/AoR+ji3G4SS36GP0s p7z/nyXNjPZEOb3ClO0foXBmw04ORlSxMYvmfnRwmeBKQDrHxuHLFK3IYF/W3RcXR8mH I6GYeyEEW8wmrdU12KGDHK9rsnrLIqP2jP4RK23wQye9BE3Kc42Q3ART1qGlZc9ASrFo hP2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=e0jVOkXj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s189si1878496pgb.126.2018.04.10.06.57.26; Tue, 10 Apr 2018 06:58:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=e0jVOkXj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754447AbeDJNxM (ORCPT + 99 others); Tue, 10 Apr 2018 09:53:12 -0400 Received: from mail-qk0-f196.google.com ([209.85.220.196]:46949 "EHLO mail-qk0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753149AbeDJNxJ (ORCPT ); Tue, 10 Apr 2018 09:53:09 -0400 Received: by mail-qk0-f196.google.com with SMTP id p67so13395167qke.13; Tue, 10 Apr 2018 06:53:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=xQ40VVVm7LMI5APNJGiU1+WGdEAXOJmWyDMTcmsLYmo=; b=e0jVOkXj1Bd+jWz/TuRFigPmZd9L3YtxYWSP9Z11Qu2IaFEl/guchWBI5FXTWSM71l sEUQlhQF9zcYmQ7pFzYPmJza+GqbcFy1K4SV8KtAmObn4ttEQ5cURFAPA+IBn3eoGXIs 3TchBhMm9ombdHwTg6J1p0iSL9SApjOO9c83H5mGlk8F30h7jIxxgcdWsvmUdzZGvoLJ 8NpfhuNifl+4xRwrdMfc7RTGfYEc3HmfPW7cAKGKsXVsCaCTZbHMSoauTl5CK6VaLdBq 0fZ/w2/E/s9FPbQOjDDt+eZP8bVI2GLTUgPqRxNkZHnfz2DrbesTiArLbt+DcgCEuis6 O+qQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=xQ40VVVm7LMI5APNJGiU1+WGdEAXOJmWyDMTcmsLYmo=; b=EgPiOX6DC8Gj2Dfq2EDJRFgsMY1ud3Hd80DkcMCKJ+RLIkHoNRRRklT2lVKpx+/xL7 n8W8iGnFRXhLMem9laDqUs7qzhmvF3RKrKJBx4vKLZoAMLngV9HRGlE3+lB1e+GVcoV9 zA9/8EH+WbESeYEwWKIzhqtbtjOPjtEUITr4KGU/wclgHDonwxUjo/e1XTU3Kr2Tbkvc xTVOAw9BW7AQwpV04AcZ/51MBYw1stCS8J2sWVOWHNLdjTLAeTUmmFUmVGG1J3PrWomw TQRB6u0BOX/Hft79pG6FQj9hkXsW8vKt05NAfG3+fwJi/f7iiDLw7oD63LR7Ypsv8w1P 6dEg== X-Gm-Message-State: ALQs6tD1cCh3jLEXWEwsthkQh1mRGVLWR/zqYeilhVR3HwKxggCAXl1x JBMyLBXhSQTgmYWOzaE6nPdH69G1 X-Received: by 10.55.140.130 with SMTP id o124mr690985qkd.187.1523368387731; Tue, 10 Apr 2018 06:53:07 -0700 (PDT) Received: from [192.168.86.235] (c-67-180-167-114.hsd1.ca.comcast.net. [67.180.167.114]) by smtp.gmail.com with ESMTPSA id r64sm2152265qkf.50.2018.04.10.06.53.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Apr 2018 06:53:06 -0700 (PDT) Subject: Re: [PATCH 1/2] slab: __GFP_ZERO is incompatible with a constructor To: Matthew Wilcox , linux-mm@kvack.org Cc: Matthew Wilcox , Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , linux-kernel@vger.kernel.org, Jan Kara , Jeff Layton , Mel Gorman , stable@vger.kernel.org References: <20180410125351.15837-1-willy@infradead.org> From: Eric Dumazet Message-ID: Date: Tue, 10 Apr 2018 06:53:04 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180410125351.15837-1-willy@infradead.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/10/2018 05:53 AM, Matthew Wilcox wrote: > From: Matthew Wilcox > > __GFP_ZERO requests that the object be initialised to all-zeroes, > while the purpose of a constructor is to initialise an object to a > particular pattern. We cannot do both. Add a warning to catch any > users who mistakenly pass a __GFP_ZERO flag when allocating a slab with > a constructor. > > Fixes: d07dbea46405 ("Slab allocators: support __GFP_ZERO in all allocators") > Signed-off-by: Matthew Wilcox > Cc: stable@vger.kernel.org Since there are probably no bug to fix, what about adding the extra check only for some DEBUG option ? How many caches are still using ctor these days ?