Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756803AbdDRNhS (ORCPT ); Tue, 18 Apr 2017 09:37:18 -0400 Received: from resqmta-ch2-12v.sys.comcast.net ([69.252.207.44]:50758 "EHLO resqmta-ch2-12v.sys.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752010AbdDRNhP (ORCPT ); Tue, 18 Apr 2017 09:37:15 -0400 Date: Tue, 18 Apr 2017 08:37:13 -0500 (CDT) From: Christoph Lameter X-X-Sender: cl@east.gentwo.org To: Michal Hocko cc: Kees Cook , Andrew Morton , Pekka Enberg , David Rientjes , Joonsoo Kim , Linux-MM , LKML Subject: Re: [PATCH] mm: Add additional consistency check In-Reply-To: <20170418064124.GA22360@dhcp22.suse.cz> Message-ID: References: <20170411141956.GP6729@dhcp22.suse.cz> <20170411164134.GA21171@dhcp22.suse.cz> <20170411183035.GD21171@dhcp22.suse.cz> <20170411185555.GE21171@dhcp22.suse.cz> <20170411193948.GA29154@dhcp22.suse.cz> <20170418064124.GA22360@dhcp22.suse.cz> Content-Type: text/plain; charset=US-ASCII X-CMAE-Envelope: MS4wfHSA6chagp04b2ezTL5WR2vHFZqshgy4+N5okM38RygABQBNPczAwj+AW+jVyLYpGlkb+/7f2liBOCm5i4E94LOZo3PtTaCkeGLylY3D05ExGWLf93ju UCGzfbPTcZyYaqDhKeknxT678MMWAG+Ym/BDK+ld/WEkKfHizBx/nfRxeOAVp3VNlWULZ3ifmqV7IjB6yY5BteKl7vyr/DAbceTeWFjfjNa2IroMnPuuW8uW DQQXcUHacBTcT1Eo+XFG3kxRuxHLLZXjSufHMOiTck1u5T1vN2qBy/5rmK4b/iD37AKIjgAn+co9km9jynD+H5yS3wQWdZo5fU5F0wtI+YzP8GpeRmzKLGOs A5CLLyC4j2PJZQVu4Ff6iOqrbZCJVQsbZD1ElqS+G5iCz19URAU= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 557 Lines: 15 On Tue, 18 Apr 2017, Michal Hocko wrote: > Are you even reading those emails? First of all we are talking about > slab here. Secondly I've already pointed out that the BUG_ON(!PageSlab) > in kmem_freepages is already too late because we do operate on a > potential garbage from invalid page... Before I forget: 1. The patch affects both slab and slub since it patches mm/slab.h and is called by both allocators. 2. The check in the patch we are discussing here when calling kmem_cache_free() will be executing before kmem_freepages() is called in slab.