Path: csiph.com!aioe.org!bofh.it!news.nic.it!robomod From: Dmitry Vyukov Newsgroups: linux.kernel Subject: Re: kernel BUG at mm/mempolicy.c:1699! Date: Fri, 29 Jul 2016 21:20:02 +0200 Message-ID: References: Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=akC/iyPonSvgz1hh4AjpxS6JUbXPTh3Wztvnl7EKmT4=; b=hNndLNuAPAr+UtRC8GGmlnY/6+HYR6KVTS1wzLku2+jFQesrO/o3SHsRyhohLAKTwZ jdwgiENNDBJA9q5vqEc7hJLeptAbFmcVlIGbpkzqiFS9PqL8EFO4gXhdUQjEpmgK2Lqr 1Rwj9S3uAR4eLjYxxpVEdyAh1tThAQ9hO/xSJrTHCoFpz8Oq+gcwQF7/sMY768AdGC7E Js2wu5fuaLbpcfAfX6Q7+1f1C2O3ZAQGzTV0BxCvh09bsil2speOOzRRwkNxmQIkBIAj FQy4RzPzEJx8sVJUbDtdDfY0FCmulOSpN68SVIv7az8objzIMk03hvkamYuVFwYk3PDJ a3Nw== X-Google-Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=akC/iyPonSvgz1hh4AjpxS6JUbXPTh3Wztvnl7EKmT4=; b=g1sWEIiPsjEz7R015Ze7tSLV3CJwvi0HCqa3f7go8wNGdHs13HHJ64etSklvozhe5Y 02xaj1loZkGuN6VMrZ3qqboceqNjy6A3WsrS6kzTzfn0k0zw1xelhBxpamaQ9YWGNvjc MWYUswazVR1H7uO3tl4kYob0Pl1SU44uEH/52Fd5JbRLfhomNpJD1A0SEPpOkEYT/5gC fdRajtWZvPWqZ8RpYuKQcaLTqBjVUdZ7E04lzk3SV4BG1Sk4BalcaIRueK8/jPo9FVhc QT1n9ptsJ1QZG56sW5XzXaU8sm8GmgFLQbTEVY57paqtptNe3Bkv3xClj4QfYpq/bEYF 2/3Q== X-Gm-Message-State: AEkoouvJM2QqO+FLRDsC7yOm2ZllPogRZkXsrCQZjmnO+NmrylCHlQB+PZOtDhZ+56FAaqmbJXx7SpQwMEONqJb3 X-Received: by 10.46.0.134 with SMTP id e6mr15341800lji.40.1469819808446; Fri, 29 Jul 2016 12:16:48 -0700 (PDT) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: robomod@news.nic.it List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Approved: robomod@news.nic.it Lines: 33 Organization: linux.* mail to news gateway X-Original-Cc: Andrey Ryabinin , Alexander Potapenko , kasan-dev , LKML , Linux MM X-Original-Date: Fri, 29 Jul 2016 21:16:29 +0200 X-Original-Message-ID: X-Original-References: <579B991C.9050809@oracle.com> <579BAA1F.6000704@oracle.com> X-Original-Sender: linux-kernel-owner@vger.kernel.org Xref: csiph.com linux.kernel:1452526 On Fri, Jul 29, 2016 at 9:10 PM, Vegard Nossum wrote: > On 07/29/2016 08:05 PM, Dmitry Vyukov wrote: >> >> On Fri, Jul 29, 2016 at 7:57 PM, Vegard Nossum >> wrote: >>> >>> ------------[ cut here ]------------ >>> kernel BUG at mm/mempolicy.c:1699! > > [...] >>> >>> In particular, it's interesting that the kernel/exit.c line is >>> >>> mpol_put(tsk->mempolicy); >>> >>> and alloc_pages_current() does (potentially): >>> >>> pol = get_task_policy(current);. >>> >>> The bug seems very new or very rare or both. >> >> >> This is https://github.com/google/kasan/issues/35 >> It is introduced with stackdepot. > > > Ah, cool. > > Would it be enough to set __GFP_THISNODE in depot_save_stack() so it > uses &default_policy instead of current->mempolicy? I don't have deep understanding of that code. But looks at the code, using &default_policy should help.