From patchwork Wed Jan 14 11:38:28 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Cox X-Patchwork-Id: 18421 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id 8BF94DE14C for ; Wed, 14 Jan 2009 22:38:19 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756368AbZANLiN (ORCPT ); Wed, 14 Jan 2009 06:38:13 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756278AbZANLiL (ORCPT ); Wed, 14 Jan 2009 06:38:11 -0500 Received: from earthlight.etchedpixels.co.uk ([81.2.110.250]:53039 "EHLO lxorguk.ukuu.org.uk" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753696AbZANLiK (ORCPT ); Wed, 14 Jan 2009 06:38:10 -0500 Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by lxorguk.ukuu.org.uk (8.14.2/8.14.2) with ESMTP id n0EBcSsY020381; Wed, 14 Jan 2009 11:38:28 GMT Date: Wed, 14 Jan 2009 11:38:28 +0000 From: Alan Cox To: Denis Joseph Barrow Cc: Linux USB kernel mailing list , Linux netdev Mailing list , Linux Serial Subject: Re: [PATCH 01/02] hso patch to fix a -EIO from opening a hso serial device Message-ID: <20090114113828.7b9f59ca@lxorguk.ukuu.org.uk> In-Reply-To: <496DCAF7.9080906@option.com> References: <496DCAF7.9080906@option.com> X-Mailer: Claws Mail 3.5.0 (GTK+ 2.12.12; x86_64-redhat-linux-gnu) Organization: Red Hat UK Cyf., Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE, Y Deyrnas Gyfunol. Cofrestrwyd yng Nghymru a Lloegr o'r rhif cofrestru 3798903 Mime-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Wed, 14 Jan 2009 12:22:31 +0100 Denis Joseph Barrow wrote: > Hi All, > This is an important patch the linux-2.6.29-rc1 driver with itworks much > better than it did. How about this. tty: Fix a kref leak in the HSO driver on re-open From: Alan Cox --- drivers/net/usb/hso.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c index c4918b8..9df04dd 100644 --- a/drivers/net/usb/hso.c +++ b/drivers/net/usb/hso.c @@ -1297,6 +1297,7 @@ static int hso_serial_open(struct tty_struct *tty, struct file *filp) /* setup */ spin_lock_irq(&serial->serial_lock); tty->driver_data = serial; + tty_kref_put(serial->tty); serial->tty = tty_kref_get(tty); spin_unlock_irq(&serial->serial_lock);