From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755592AbcBCOhE (ORCPT ); Wed, 3 Feb 2016 09:37:04 -0500 Received: from mail-wm0-f45.google.com ([74.125.82.45]:36531 "EHLO mail-wm0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752905AbcBCOhC (ORCPT ); Wed, 3 Feb 2016 09:37:02 -0500 Date: Wed, 3 Feb 2016 15:37:00 +0100 From: Michal Hocko To: Mike Galbraith Cc: Tejun Heo , LKML Subject: Re: mod_delayed_work() explosion due to 874bbfe6 Message-ID: <20160203143700.GD6762@dhcp22.suse.cz> References: <1454424264.11183.46.camel@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1454424264.11183.46.camel@gmail.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 02-02-16 15:44:24, Mike Galbraith wrote: > Hi Tejun, > > I'm looking at a crash analysis that fingers 874bbfe6 as being the > culprit. (I didn't do the analysis, but it appears to be correct) > > Scenario: CPU168 calls mod_delayed_work(), is taken offline before the > timer expires. Due to 874bbfe6, dwork->cpu is the now offline CPU168 > vs the previous WORK_CPU_UNBOUND, timer fires on CPU131, it tries to > __queue_work() with cpu == the now offline CPU168, gets to... > > } else > pwq = unbound_pwq_by_node(wq, cpu_to_node(cpu)); > > ... and goes boom. > > > crash> p numa_node | grep 168 > [168]: ffff8c03fdf0e328 > crash> rd ffff8c03fdf0e328 > ffff8c03fdf0e328: 00000000ffffffff ........ > > Thus, pwq becomes 000000000. Then, as the result of reference to > pwq->pool, NULL reference occurs at (*PANIC). > > > What if anything is supposed to prevent this? AFAICS [1] nothing... --- [1] http://lkml.kernel.org/r/20160203122855.GB6762@dhcp22.suse.cz -- Michal Hocko SUSE Labs