public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Denis Joseph Barrow <D.Barow@option•com>
To: Oliver Neukum <oliver@neukum•org>,
	schwidefsky@de•ibm.com, strasse@de•ibm.com,
	Paul Hardwick <P.Hardwick@option•com>
Cc: ajb@spheresystems•co.uk, Greg Kroah-Hartman <greg@kroah•com>,
	linux-usb@vger•kernel.org, netdev@vger•kernel.org,
	Alan Cox <alan@lxorguk•ukuu.org.uk>
Subject: Re: another race in hso
Date: Fri, 19 Dec 2008 12:06:35 +0100	[thread overview]
Message-ID: <494B803B.9000703@option.com> (raw)
In-Reply-To: <200812191145.31556.oliver@neukum.org>

Yes Oliver,
There are loads of races in the hso driver it's as ugly as sin.
I've been doing nothing but blocking holes not eliminating races which probably
would require a serious redesign & I don't have the clarity of thought like martin schwidefsky
to do it.
There were almost none in my lcs driver though martin didn't believe me & had to rewrite it.
Get Martin Schwidefsky to look over it.
I hope he needs to write a 3g modem driver for linux on the z series anyway
so he may as well get used to the code.


Oliver Neukum wrote:
> Hi,
> 
> there is another race.
> 
> static int hso_get_activity(struct hso_device *hso_dev)
> {
> 	if (hso_dev->usb->state == USB_STATE_SUSPENDED) {
> 		if (!hso_dev->is_active) {
> 			hso_dev->is_active = 1;
> 			schedule_work(&hso_dev->async_get_intf);
> 		}
> 	}
> 
> 	if (hso_dev->usb->state != USB_STATE_CONFIGURED)
> 		return -EAGAIN;
> 
> here's the window.
> 
> 	usb_mark_last_busy(hso_dev->usb);
> 
> 	return 0;
> }
> 
> CPU A							CPU B
> 
> run until the window
> 								autosuspend of device
> submitting URB to suspended device
> 
> You get an unnecessary error.
> 
> 	Regards
> 		Oliver


-- 
best regards,
D.J. Barrow

Linux Kernel Developer
Option NV, Gaston Geenslaan 14, 3001 Leuven, Belgium
 
T: +32 16 311 621
F: +32 16 207 164
Mobile Ireland: +353-86-1715438
Mobile Belgium  +32-496-226190
d.barow@option•com
barrow_dj@yahoo•com
www.option.com
www.travelsmart.ie

Disclaimer:
http://www.option.com/company/disclaimer.shtml
 RPR Leuven 0429.375.448

  reply	other threads:[~2008-12-19 11:07 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-19 10:45 another race in hso Oliver Neukum
2008-12-19 11:06 ` Denis Joseph Barrow [this message]
     [not found]   ` <494B803B.9000703-x9gZzRpC1QbQT0dZR+AlfA@public.gmane.org>
2008-12-19 12:26     ` Chris Snook
2008-12-19 12:42       ` Oliver Neukum
2008-12-19 12:56       ` Denis Joseph Barrow
  -- strict thread matches above, loose matches on Subject: below --
2008-12-22 13:54 Oliver Neukum
2009-01-12  8:57 ` Denis Joseph Barrow
2009-01-12  9:11   ` Oliver Neukum
2009-01-12 11:33   ` Oliver Neukum
2009-01-12 13:25 ` Denis Joseph Barrow
     [not found]   ` <496B44CD.5080702-x9gZzRpC1QbQT0dZR+AlfA@public.gmane.org>
2009-01-12 13:36     ` Oliver Neukum
     [not found]       ` <200901121436.16576.oliver-GvhC2dPhHPQdnm+yROfE0A@public.gmane.org>
2009-01-12 13:52         ` Denis Joseph Barrow
     [not found]           ` <496B4B39.3090908-x9gZzRpC1QbQT0dZR+AlfA@public.gmane.org>
2009-01-12 14:02             ` Oliver Neukum
     [not found] ` <200812221454.57794.oliver-GvhC2dPhHPQdnm+yROfE0A@public.gmane.org>
2009-01-12 16:35   ` Denis Joseph Barrow
     [not found]     ` <496B7159.3000500-x9gZzRpC1QbQT0dZR+AlfA@public.gmane.org>
2009-01-12 16:46       ` Oliver Neukum

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=494B803B.9000703@option.com \
    --to=d.barow@option$(echo .)com \
    --cc=P.Hardwick@option$(echo .)com \
    --cc=ajb@spheresystems$(echo .)co.uk \
    --cc=alan@lxorguk$(echo .)ukuu.org.uk \
    --cc=greg@kroah$(echo .)com \
    --cc=linux-usb@vger$(echo .)kernel.org \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=oliver@neukum$(echo .)org \
    --cc=schwidefsky@de$(echo .)ibm.com \
    --cc=strasse@de$(echo .)ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox