Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757543AbcJTXBf (ORCPT ); Thu, 20 Oct 2016 19:01:35 -0400 Received: from mail-vk0-f53.google.com ([209.85.213.53]:34833 "EHLO mail-vk0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753483AbcJTXBe (ORCPT ); Thu, 20 Oct 2016 19:01:34 -0400 MIME-Version: 1.0 In-Reply-To: <20161020225028.czodw54tjbiwwv3o@codemonkey.org.uk> References: <20161011144507.okg6baqvodn2m2lh@codemonkey.org.uk> <20161018224205.bjgloslaxcej2td2@codemonkey.org.uk> <20161018233148.GA93792@clm-mbp.masoncoding.com> <20161018234248.GB93792@clm-mbp.masoncoding.com> <332c8e94-a969-093f-1fb4-30d89be8993e@kernel.org> <20161020225028.czodw54tjbiwwv3o@codemonkey.org.uk> From: Andy Lutomirski Date: Thu, 20 Oct 2016 16:01:12 -0700 Message-ID: Subject: Re: bio linked list corruption. To: Dave Jones , Andy Lutomirski , Linus Torvalds , Chris Mason , Jens Axboe , Al Viro , Josef Bacik , David Sterba , linux-btrfs , Linux Kernel Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 807 Lines: 21 On Thu, Oct 20, 2016 at 3:50 PM, Dave Jones wrote: > On Tue, Oct 18, 2016 at 06:05:57PM -0700, Andy Lutomirski wrote: > > > One possible debugging approach would be to change: > > > > #define NR_CACHED_STACKS 2 > > > > to > > > > #define NR_CACHED_STACKS 0 > > > > in kernel/fork.c and to set CONFIG_DEBUG_PAGEALLOC=y. The latter will > > force an immediate TLB flush after vfree. > > I can give that idea some runtime, but it sounds like this a case where > we're trying to prove a negative, and that'll just run and run ? In which case I > might do this when I'm travelling on Sunday. The idea is that the stack will be free and unmapped immediately upon process exit if configured like this so that bogus stack accesses (by the CPU, not DMA) would OOPS immediately.