Received: by 10.213.65.68 with SMTP id h4csp4347555imn; Tue, 10 Apr 2018 13:25:37 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/n8BqOvW7wgh+uDzEk7z0WJmZU1DVFzEOP9KMqWsxQQ6BXQv04doJJhYuSgDWS8H8cRmJX X-Received: by 2002:a17:902:b082:: with SMTP id p2-v6mr1935487plr.11.1523391937714; Tue, 10 Apr 2018 13:25:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523391937; cv=none; d=google.com; s=arc-20160816; b=YfWe55lqlAFkvkyQT1N7e3rYMtUPTlV5H68+DWjN78ttaxg9y1HFTafIvrAjsoIK8x h2/TqhSO1NEhfM3DqzqQ7e3IEd5oof1OfngbcDD8n3+hZ7SjpkrVUiQ0PrwFbEjOJ9F+ BVlVlX2PrI2BROUos+8T8xjEF/4DWOY3fXjTPyHST1/hQJ1jbqvbpnPUZUTIMbzSVgF2 TFusLEupHC2v4xQb7QC7k2jwv32ZGl/IQIRmENOZ/4JDHOpnqRVVAVXAympwWd5QsSKr MZng01UZ6vPfe6QocaJNXwU/sxYc1ZTPKX8UkJIGKbAgzkJdU049XJyIxbGuZnj3KdZ+ WsMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date :arc-authentication-results; bh=j9MO1HqTLm96M0kzcMJUfWLxWDEH4hFXkQ0B1gTD+W0=; b=uBoADUyYvCeX8wWmlO4YX3oWgnf24yRJ1sVmexBR66s8bkeOweDwj0XxtHe3LoVnL8 F0tvYxR4v4gII8KdtoNYdgUPFiTSsHrEu4jdEwax2c+/zZIU6PMmBY77UZJlEFC3d1gw iDLxe4ak8bbV9c8OIU8D1UtATcAQvWK5cGNaniWD7oetbBsYtKAkyaQj/fKMHthdwwuS Sc96MNRmlu1VmNy8ZHpy84FLa0IPLY/XHoXnP8vb+azgDAodQhM8B/5PF9vbaSgb301z J8Z05inSqb0ec578zCPBtTJ9Wkzm40uWQ6ue9s3s1QUDTYsBQqvKZMGWXH6FUbBOT1bC mRkw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n3si2486698pff.312.2018.04.10.13.25.00; Tue, 10 Apr 2018 13:25:37 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753213AbeDJUVt (ORCPT + 99 others); Tue, 10 Apr 2018 16:21:49 -0400 Received: from resqmta-ch2-11v.sys.comcast.net ([69.252.207.43]:37096 "EHLO resqmta-ch2-11v.sys.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752627AbeDJUVr (ORCPT ); Tue, 10 Apr 2018 16:21:47 -0400 Received: from resomta-ch2-15v.sys.comcast.net ([69.252.207.111]) by resqmta-ch2-11v.sys.comcast.net with ESMTP id 5zlyfLrHJOtE45zlzfMV9V; Tue, 10 Apr 2018 20:21:47 +0000 Received: from gentwo.org ([98.222.162.64]) by resomta-ch2-15v.sys.comcast.net with SMTP id 5zlxfktXlswa25zlxf6VHD; Tue, 10 Apr 2018 20:21:46 +0000 Received: by gentwo.org (Postfix, from userid 1001) id 0AFD81160B41; Tue, 10 Apr 2018 15:21:45 -0500 (CDT) Received: from localhost (localhost [127.0.0.1]) by gentwo.org (Postfix) with ESMTP id 0938411600FD; Tue, 10 Apr 2018 15:21:45 -0500 (CDT) Date: Tue, 10 Apr 2018 15:21:45 -0500 (CDT) From: Christopher Lameter X-X-Sender: cl@nuc-kabylake To: Matthew Wilcox cc: Eric Dumazet , linux-mm@kvack.org, Matthew Wilcox , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , linux-kernel@vger.kernel.org, Jan Kara , Jeff Layton , Mel Gorman , stable@vger.kernel.org Subject: Re: [PATCH 1/2] slab: __GFP_ZERO is incompatible with a constructor In-Reply-To: <20180410175011.GE3614@bombadil.infradead.org> Message-ID: References: <20180410125351.15837-1-willy@infradead.org> <20180410165054.GC3614@bombadil.infradead.org> <20180410173841.GD3614@bombadil.infradead.org> <20180410175011.GE3614@bombadil.infradead.org> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-CMAE-Envelope: MS4wfPUKRHkC95QsYrsIT/As+M4MSZCyYLCp+5Cst2swZujtOJoUrFHU7zC4Nl1QMG4754OssGAAdlEis2Jnkr3d5BnTplf67r8GdqdzQL8jAnjP5sRgI2Gc j3pmFYt3AdHvOHRJLzhj3b6Vcdmh+OYTekB9puRGA0tveYrtyPA3Ft/w1j9B/ZdSJymy1S31mOdgBqtTw7HPaz2WgJqwQqbgClGy0xiG6UJn81qgSKse348b yoKp+1qBggTOQLgWOuwmGEzvqJ6f78E3wgj/gvNiV8qyUr5R0i9k91YPOHiX36b4Jrz1tOHk4xRXy+vQwaItR4Z8VEVwR0PDXV34+9BsTgKRH8tV93DgPqrV cVGg6cvraYbImt7vG1iJ4DBWp3CBRNFit8iQGmZDHH/8ipyt8ogyGOvULfJQ/YrXm30yxzHYoJ7Out4N0By4ITrTbNlx90A2kU1AVUT0oIi3Bjob/SjagaSR 8myGqifIT2oxKk2KqJJEEQvQ9zWEEqcrkBcDiUMv9YXpDi0yV5fzydZGj41mOd1cM6avl+nNpRFrMrpTAjOouxI9aJpkOG/zqwwj/Q== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 10 Apr 2018, Matthew Wilcox wrote: > > Objects can be freed and reused and still be accessed from code that > > thinks the object is the old and not the new object.... > > Yes, I know, that's the point of RCU typesafety. My point is that an > object *which has never been used* can't be accessed. So you don't *need* > a constructor. But the object needs to have the proper contents after it was released and re-allocated. Some objects may rely on contents (like list heads) surviving the realloc process because access must always be possible. validate_slab() checks on proper metadata content in a slab although it does not access the payload. So that may work you separate the payload init from the metadata init.