From patchwork Thu Dec 18 13:57:35 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oliver Neukum X-Patchwork-Id: 14670 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 2C1ABDDED0 for ; Fri, 19 Dec 2008 00:55:52 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751513AbYLRNzr (ORCPT ); Thu, 18 Dec 2008 08:55:47 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751490AbYLRNzq (ORCPT ); Thu, 18 Dec 2008 08:55:46 -0500 Received: from smtp-out003.kontent.com ([81.88.40.217]:45668 "EHLO smtp-out003.kontent.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751421AbYLRNzq (ORCPT ); Thu, 18 Dec 2008 08:55:46 -0500 Received: from noname (p549A35D8.dip0.t-ipconnect.de [84.154.53.216]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: neukum_org@smtp-out.kontent.com) by smtp-out.kontent.com (Postfix) with ESMTP id A083E40004AC; Thu, 18 Dec 2008 14:55:29 +0100 (CET) From: Oliver Neukum Organization: Novell To: ajb@spheresystems.co.uk, "Greg Kroah-Hartman" , netdev@vger.kernel.org, jgarzik@pobox.com, USB list Subject: [patch]startup race in hso driver Date: Thu, 18 Dec 2008 14:57:35 +0100 User-Agent: KMail/1.9.9 MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200812181457.36340.oliver@neukum.org> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The flag marking a device running must be set before the URBs for recption are submitted or they may complete too early and fail to resubmit. Signed-off-by: Oliver Neukum Regards Oliver --- -- 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 8e90891..cc75c8b 100644 --- a/drivers/net/usb/hso.c +++ b/drivers/net/usb/hso.c @@ -658,10 +658,9 @@ static int hso_net_open(struct net_device *net) odev->rx_buf_missing = sizeof(struct iphdr); spin_unlock_irqrestore(&odev->net_lock, flags); - hso_start_net_device(odev->parent); - /* We are up and running. */ set_bit(HSO_NET_RUNNING, &odev->flags); + hso_start_net_device(odev->parent); /* Tell the kernel we are ready to start receiving from it */ netif_start_queue(net);