From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756219Ab1KWVrh (ORCPT ); Wed, 23 Nov 2011 16:47:37 -0500 Received: from mga03.intel.com ([143.182.124.21]:38643 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753146Ab1KWVrg (ORCPT ); Wed, 23 Nov 2011 16:47:36 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.69,561,1315206000"; d="scan'208";a="78620305" Date: Wed, 23 Nov 2011 21:59:09 +0000 From: Alan Cox To: Havard Skinnemoen Cc: Jiri Slaby , Dave Jones , Linux Kernel , Greg Kroah-Hartman , Jiri Slaby Subject: Re: [RFC] cdc-acm: Fix potential deadlock (lockdep warning) Message-ID: <20111123215909.5bec72bf@bob.linux.org.uk> In-Reply-To: References: <1322074412-10873-1-git-send-email-hskinnemoen@google.com> <20111123192233.44f512b7@bob.linux.org.uk> <20111123194423.158002cf@bob.linux.org.uk> Organization: Intel X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.0; x86_64-redhat-linux-gnu) Organisation: Intel Corporation UK Ltd, registered no. 1134945 (England), Registered office Pipers Way, Swindon, SN3 1RJ Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 23 Nov 2011 13:03:27 -0800 Havard Skinnemoen wrote: > On Wed, Nov 23, 2011 at 11:44 AM, Alan Cox > wrote: > > Any data owned by the USB part needs to be handled by the USB > > driver. In the case of usb-serial it keeps its own krefs for that > > because the lifetime of the port/USB serial data is not the same as > > the lifetime of the tty itself. > > Yes, exactly. But since tty_port already has a kref, why not use that? > It doesn't have any other use currently. Indeed > Hmm, a quick grep tells me tty_port_get() and tty_port_put() are > completely unused. What was the intention behind them? To provide a way to use the kref nicely.