Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp3535699imc; Wed, 13 Mar 2019 22:30:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqyCvRdYrt8TIzKYv/DG03KQM13j4KWe+4Kp1kPHwvdsClRNqRrkF1oX/GcQeoz8dVdCnSWp X-Received: by 2002:a17:902:788d:: with SMTP id q13mr50166613pll.154.1552541451311; Wed, 13 Mar 2019 22:30:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552541451; cv=none; d=google.com; s=arc-20160816; b=OOny5WdD6n6SP1r9bnA9TdZ2X6vGhxJ3a7D+2LTMb48NbuCEIaq3od2WgJkUTgr3R5 MkwcC53XPhSWsRFIGTNioC4Em66SxkkiyK5TAiWZRKIW7EVacwiGpYs/vB1EjCCP7HOj cZnqPTY+HHR+HAhMNcrqGReLJqLo5DalrH9U1MlLB++Zn59tNqlC/MXeiKa/W+VSkTHF GcFlRm6VM3kUgyBIuoo41KQp47awdXZRY9p2sBRh0xTR8PTfrfzZAipiEzxub4sb5ufE HBqMHwI2PBh9E1gRf9bHKYvMfkedQ8SDUTio3YgmBf/pr6ja7MfhTSOhPS8EKOlzkKnz ADMQ== 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=l2VRXzebQq3qBUiOtsrnX5b+iukGPh2SG17hH96CLTc=; b=QK/kbwPhEHhoNhFWr5B/q4Ib4Bzol2zaOVPkU+jkORKafIAzHTA5ah0kdU7gROzq8n boFS/gvMIok74qv+Fa/8ZzBr0AO5Q10MzJIgjXm4UsBCy3uwLtm8ZoNZTXePbklxNPPT X6ZULcJwb9+fcdMk+XkioGHw6OaAsTgr6QgxitrydwI7Pf8la3X+IVsH2lTC1pySRo9d omjLtwZX4mk+CvCLmxOPHq0l/uaWuTDzYOid9e+2SAZnHuA2i8nhSlVT124JE8Vq3n4Y SnrmKP2e6+2bCjhThdJViqEoBCmC77KVWLzuNghufVticLNcHTjz44+TWktoErph1RXR 3bAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Mu9FlgAe; 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 g75si12572189pfg.49.2019.03.13.22.30.35; Wed, 13 Mar 2019 22:30:51 -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=Mu9FlgAe; 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 S1726539AbfCNFaR (ORCPT + 99 others); Thu, 14 Mar 2019 01:30:17 -0400 Received: from mail-lf1-f68.google.com ([209.85.167.68]:35255 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726130AbfCNFaQ (ORCPT ); Thu, 14 Mar 2019 01:30:16 -0400 Received: by mail-lf1-f68.google.com with SMTP id h6so3240318lfc.2 for ; Wed, 13 Mar 2019 22:30:15 -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=l2VRXzebQq3qBUiOtsrnX5b+iukGPh2SG17hH96CLTc=; b=Mu9FlgAeN3q+ft0Xgg3bwn1z0JBH2GvpvRGZ/xRrUoDAMpacHj4QYf07rM7/gf4Zfz oBUTvlwR19yBpDlv9/QP8roBKqdJd+FXo7iYPkt8FqaRuZKg3DI/xFRbmbVd0R67jDLW jLyp9KnAFWwPMTtNxw112Q8hgJHLQISrMQLWn4XLGbuPSsjMDZbQ8tRrGZ35cr8iS4+M z/fQMDQ37stobiGV6qSDsHga3F8ChcC02A1tTV9e0v3GFLpDqlKO+ZQ6K+nJzeWDPpN/ B4IZZ5LdtyW2kEPDEeimoYY9VcUdhw/Erf+KIRfryrL9WdpUlpNe+NFunkkgnB9rtsmc U4aw== 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=l2VRXzebQq3qBUiOtsrnX5b+iukGPh2SG17hH96CLTc=; b=lcIjAYcwtjEICnZU6KVz2DNJOV7IBlGIwndUIRp07XXHrUPQsJnp7UMPrhfavJ7zLe anTxta7dlq3swqI/mSVIHdV0/5gk7nnx7jjmVFI8IxMrhsJ5AHA3QONUuJE5wxU7D3b8 J1ykTg1Cn0o3sedkXCtCnQKgx0Leu1hDEf2J0HQHF+0S7YXe+jvPf4Sh/JzHp8ycd3we fpBhDjDe9DpFVidBZMRpb4knmCVfkAcHhvY1sAqMci0ZdHdpaqwkCIWilGOZ6Wt1ZZjg RA4/r4l+VzD7vOxC+YQWphrBpLuQnlxu5/s1w2JWB93ydTyr4tCsAn0bBDxcZBD+U5zG u3OQ== X-Gm-Message-State: APjAAAVq4DLrw8t/QyVB4Me0rs2KVJqoqmcDPlzIRUYjA7lSaXZucuvv MeyxS8G8jpfI9pX1YFMKLX/EuD2Wm9dkwf3Xl70= X-Received: by 2002:a19:520e:: with SMTP id m14mr25761697lfb.64.1552541414511; Wed, 13 Mar 2019 22:30:14 -0700 (PDT) MIME-Version: 1.0 References: <20190218165620.383905466@infradead.org> <20190222124544.GY9565@techsingularity.net> <14a9adf7-9b50-1dfa-0c35-d04e976081c2@oracle.com> <19d5d492-a4c1-b3c8-cae4-da2fdfcb872b@oracle.com> <8098aac2-60f7-6fe9-2a3a-2fe2e1b49bde@linux.intel.com> In-Reply-To: <8098aac2-60f7-6fe9-2a3a-2fe2e1b49bde@linux.intel.com> From: Aubrey Li Date: Thu, 14 Mar 2019 13:30:03 +0800 Message-ID: Subject: Re: [RFC][PATCH 00/16] sched: Core scheduling To: Tim Chen Cc: Subhra Mazumdar , Mel Gorman , Peter Zijlstra , Ingo Molnar , Thomas Gleixner , Paul Turner , Linux List Kernel Mailing , Linus Torvalds , "Fr?d?ric Weisbecker" , Kees Cook , Greg Kerr 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 Thu, Mar 14, 2019 at 8:35 AM Tim Chen wrote: > >> > >> One more NULL pointer dereference: > >> > >> Mar 12 02:24:46 aubrey-ivb kernel: [ 201.916741] core sched enabled > >> [ 201.950203] BUG: unable to handle kernel NULL pointer dereference > >> at 0000000000000008 > >> [ 201.950254] ------------[ cut here ]------------ > >> [ 201.959045] #PF error: [normal kernel read fault] > >> [ 201.964272] !se->on_rq > >> [ 201.964287] WARNING: CPU: 22 PID: 2965 at kernel/sched/fair.c:6849 > >> set_next_buddy+0x52/0x70 > > > Shouldn't the for_each_sched_entity(se) skip the code block for !se case > have avoided null pointer access of se? > > Since > #define for_each_sched_entity(se) \ > for (; se; se = se->parent) > > Scratching my head a bit here on how your changes would have made > a difference. This NULL pointer dereference is not replicable, which makes me thought the change works... > > In your original log, I wonder if the !se->on_rq warning on CPU 22 is mixed with the actual OOPs? > Saw also in your original log rb_insert_color. Wonder if that > was actually the source of the Oops? No chance to figure this out, I only saw this once, lockup occurs more frequently. Thanks, -Aubrey