Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2599477imm; Thu, 18 Oct 2018 18:18:25 -0700 (PDT) X-Google-Smtp-Source: ACcGV61Afo2YibNnhjYugSIcU94GLZmEIujNRHxIMdXxeke/0v1f6nE4IMDORzooLTMV+IsXYVaY X-Received: by 2002:a63:415:: with SMTP id 21-v6mr8602105pge.204.1539911905899; Thu, 18 Oct 2018 18:18:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539911905; cv=none; d=google.com; s=arc-20160816; b=fXIw2u4XrvKgUtlbKEf0sT0EupwXeEcLWcizFmf4Iq/s8BtudT9lngt2rD+G6sAjNN KuCW7rhFSMKQNrBYF2NZwKPhUqrWvmD4wOQBFyvBNTYFW+ETCDOxsPEWNQWB5sLXFeE4 6Pqp3/z4AM3Z/JJ2v8eWdH1WozhnmjFlPlh2RtdrR9ERNlQ9PuV/4lauVAMW/BDVoAgE S/euUdfN5FNs/bDbx+b44Scjss64+EFD/hORL2RQFm7A4xvdGRIbDC2BL4rqXEBxLJNx C7tePUiVvZ3Y2313oHR2Yl2YSNY6SUh39VC8Gbx2/OJwyVXKy5x3opAIyCNFek6X4Eot NOEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=EkR8gMq62S4DjkM79QLXmfpWy6agKlIDL1G3casjips=; b=UoBDvZhoRN3gAG2tEwqmNMSvcepNxNHDEsTOQM09RtaEAfKnTBALvMdoEMYsoeUB+L iWwFZRLTzLA1hudYGOt8CXgXwp0XylNRCpD1X+Mwx92vQeoczhVxVMukxjcUYvcvFJo9 /a+RfsQ2y26jftJG8fbqU2oWNImUKJ1t99AxjgfwN97K+lIonPe/vN56H1YDLa65U702 JNuhsvonKYtIu+D3qYd3yQ1bPRlrAUEbB+waIkF1lNWc5vIBsvld4GCVL23ZLu0p1SgO gDBMuenCwH+ihrVDiKSaTZM9hAYRjmyUTTbg8swG02IoWh8dZ3wI6Ehv5idvdqXFvVnW WlZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=WKyipwu3; 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 w6-v6si24094034pgm.557.2018.10.18.18.18.09; Thu, 18 Oct 2018 18:18:25 -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=WKyipwu3; 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 S1726534AbeJSJVe (ORCPT + 99 others); Fri, 19 Oct 2018 05:21:34 -0400 Received: from mail-ed1-f66.google.com ([209.85.208.66]:43220 "EHLO mail-ed1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725934AbeJSJVd (ORCPT ); Fri, 19 Oct 2018 05:21:33 -0400 Received: by mail-ed1-f66.google.com with SMTP id y20-v6so29950296eds.10; Thu, 18 Oct 2018 18:17:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=EkR8gMq62S4DjkM79QLXmfpWy6agKlIDL1G3casjips=; b=WKyipwu38Xhd8NzVodKIMBkV5KXWN4DLsUvPJRkBqh3FtN0HmHDe9t9ARDc6Z6RE4T E1KzdO/UvLrGPkykDM4D4LyPh3v9FnHToQ9Cj69+9fuGnJDkAnnwEA0h04emL/yI6V4U WOeiBy3rLWJxAgeeDy7VTiHIRDQUjYraluhSTwMnNzdDtuwg1k2Q9nYdzi8JogGG2Ijv BfoNQcqGRE7fxR4LIfB1/1xkSh3MotJsD02GEG4Mqpvzb0KnJ0hDFW1ACpx7NciTAfjh q4p2H2J+Dpf3Th/u7YAJLECWkTscrHhjmlJlKMH3HPe6PuY1qrIiaw1HfBJ7DqltrWZP 5V/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=EkR8gMq62S4DjkM79QLXmfpWy6agKlIDL1G3casjips=; b=Kp+HvASBrpsytb+sXgj1BGp1AWgdZ9lUTtiSyvQ6BD8W6GcFTsiZrueGrIGS+FyXl+ +/g8BeYN6Ol+bhVgvNDk2lSo0yj8YGrzfHI17GA5DdQVlgdhGyZvzrvpOjrtU/E0/79T zLL/9UdYornzUZBQdwjl8T+o23x/doQQQ++zCmTbMhtoMkURyizsUtlh8fxm+WaJxx4c TYeqJj6grK6tMu2mhVTMCFkOqcWURQtyqVD8IiZP7YQQE3vMOpcAa2kWNl0qkSE7fvNm qNa6jRr5ma8gC8oto8ca7upXgGR8LC1ULFF8G/XLtfzL4zsir7qvu8o1nzRdP2TEQ/nm ERQw== X-Gm-Message-State: ABuFfoh4oecan90peO3BzdFZeDucHHe/IFDi8Ooi0Si3t9KjDebA66rm tuvLZE//3ymKdEkjQ8mw80w9FlNnGPQ/n3jcCA== X-Received: by 2002:a50:a384:: with SMTP id s4-v6mr4902526edb.121.1539911867992; Thu, 18 Oct 2018 18:17:47 -0700 (PDT) MIME-Version: 1.0 References: <20181009063500.GB3555@osiris> <20181016073629.GA3194@osiris> In-Reply-To: <20181016073629.GA3194@osiris> From: Pingfan Liu Date: Fri, 19 Oct 2018 09:17:36 +0800 Message-ID: Subject: Re: [BUG -next 20181008] list corruption with "mm/slub: remove useless condition in deactivate_slab" To: heiko.carstens@de.ibm.com Cc: Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , linux-next@vger.kernel.org, linux-mm@kvack.org, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 16, 2018 at 3:36 PM Heiko Carstens wrote: > > On Tue, Oct 16, 2018 at 02:29:28PM +0800, Pingfan Liu wrote: > > > I think it is caused by the uinon page->lru and page->next. It can be fixed by: > > > diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h > > > index 3a1a1db..4aa0fb5 100644 > > > --- a/include/linux/slub_def.h > > > +++ b/include/linux/slub_def.h > > > @@ -56,6 +56,7 @@ struct kmem_cache_cpu { > > > #define slub_set_percpu_partial(c, p) \ > > > ({ \ > > > slub_percpu_partial(c) = (p)->next; \ > > > + p->next = NULL; \ > > > }) > > > > > > I will do some test and post the fix. > > > > > Please ignore the above comment. And after re-check the code, I am > > sure that all callers of deactivate_slab(), pass c->page, which means > > that page should not be on any list. But your test result "list_add > > double add: new=000003d1029ecc08, > > prev=000000008ff846d0,next=000003d1029ecc08" indicates that > > page(new) is already on a list. I think that maybe something else is > > wrong which is covered. > > I can not reproduce this bug on x86. Could you share your config and > > cmdline? Any do you turn on any debug option of slub? > > You can re-create the config with "make ARCH=s390 debug_defconfig". > > Not sure which machine I used to reproduce this but most likely it was > a machine with these command line options: > > dasd=e12d root=/dev/dasda1 userprocess_debug numa_debug sched_debug > ignore_loglevel sclp_con_drop=1 sclp_con_pages=32 audit=0 > crashkernel=128M ignore_rlimit_data > > You can ignore the dasd and sclp* command line options. These are > s390 specific. The rest should be available on any architecture. > Thank you for the info. I can reproduce the bug, and find that this bug is caused by this commit. In deactivate_slab(), page is firstly add_full(), then hit the redo condition, hence it should be remove_full(). This wrong commit erases the related code. Regards, Pingfan