Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755675Ab2FJOG2 (ORCPT ); Sun, 10 Jun 2012 10:06:28 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:43342 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751780Ab2FJOG0 convert rfc822-to-8bit (ORCPT ); Sun, 10 Jun 2012 10:06:26 -0400 MIME-Version: 1.0 In-Reply-To: References: <1339133929-30679-1-git-send-email-ming.lei@canonical.com> Date: Sun, 10 Jun 2012 22:06:23 +0800 Message-ID: Subject: Re: [PATCH] driver core: fix shutdown races with probe/remove(v1) From: Ming Lei To: Alan Stern Cc: Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 762 Lines: 22 On Fri, Jun 8, 2012 at 9:40 PM, Alan Stern wrote: > > Would you prefer to use device_trylock in a loop? ?I guess this comes Yes, looks trylock in loop is safer than locking simply, and another advantage is that the buggy device or driver can be logged. So will do the v2 using trylock. > down to which you prefer: a hang during shutdown, or a crash. ?:-) Considered that the device or driver can be logged, either hang or crash will be fixed later by someone, :-) Thanks, -- Ming Lei -- 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/