From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934065Ab3AOXRz (ORCPT ); Tue, 15 Jan 2013 18:17:55 -0500 Received: from mail-pa0-f47.google.com ([209.85.220.47]:34045 "EHLO mail-pa0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933949Ab3AOXRw (ORCPT ); Tue, 15 Jan 2013 18:17:52 -0500 Date: Tue, 15 Jan 2013 15:17:47 -0800 From: Tejun Heo To: Linus Torvalds Cc: Ming Lei , Alex Riesen , Alan Stern , Jens Axboe , USB list , Linux Kernel Mailing List Subject: Re: USB device cannot be reconnected and khubd "blocked for more than 120 seconds" Message-ID: <20130115231747.GI2668@htj.dyndns.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, Linus Will continue on another reply but this one is relevant so... On Tue, Jan 15, 2013 at 10:18:45AM -0800, Linus Torvalds wrote: > Tejun, is there a good way for code to see "I'm running in async > context"? Then we could do something like Almost. With a bit of modification we can ask whether current is a kworker, reach struct worker_struct via kthread_data() if so and then test worker->current_func against the async workfn. Thanks. -- tejun