Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756402AbaJHMPH (ORCPT ); Wed, 8 Oct 2014 08:15:07 -0400 Received: from mail-qg0-f42.google.com ([209.85.192.42]:53226 "EHLO mail-qg0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754192AbaJHMPF (ORCPT ); Wed, 8 Oct 2014 08:15:05 -0400 Date: Wed, 8 Oct 2014 08:15:02 -0400 From: Tejun Heo To: Arun KS Cc: Arun KS , "linux-kernel@vger.kernel.org" , laijs@cn.fujitsu.com, Silesh C V Subject: Re: [Workqueue] crash in process_one_work Message-ID: <20141008121502.GA8184@htj.dyndns.org> References: <20141006153224.GC18303@htj.dyndns.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, Arun. On Wed, Oct 08, 2014 at 05:30:20PM +0530, Arun KS wrote: > > I sure hope not. How reproducible is the issue? Can you try w/ > > CONFIG_DEBUG_OBJECTS_WORK enabled? > > Thanks for replying. > That was a problem with one of our driver. It was freeing the > memory(struct work) without flushing workqueue. > We caught faulty driver by adding a BUG_ON() in INIT_WORK and looking > at the func pointer in work_struct( which will be pointing to the > faulty driver work function) > > 1) faulty driver queue_work to system_unbownded_wq > 2) free work_struct memory, but it is still queued in the work queue. > 3) another driver request the memory from SLAB, go the same memory, it INIT_WORK > 4) process work try to execute the work queued by the faulty driver, > result in a crash. Ah, good to hear. I think bugs like the above should be detectable with CONFIG_DEBUG_OBJECTS_WORK, so if you see something similar next time, please try it out. Thanks. -- tejun -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/