mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Oliver Neukum <oliver@neukum.name>
To: "John Tyner" <jtyner@cs.ucr.edu>, "Greg KH" <greg@kroah.com>
Cc: <linux-kernel@vger.kernel.org>, linux-usb-devel@lists.sourceforge.net
Subject: Re: Vicam/3com homeconnect usb camera driver
Date: Mon, 7 Oct 2002 11:43:21 +0200	[thread overview]
Message-ID: <m17yUpC-006hzVC@Mail.ZEDAT.FU-Berlin.DE> (raw)
In-Reply-To: <000e01c26d8f$987153f0$0a00a8c0@refresco>


> Attached is a patch against 2.5.40 with __dev* uses removed and the error
> checking in the open routine fixed.
>
> Let me know if the ordering of the video_unregister_device and tasklet_kill
> is still an issue.

Well, here we go again, there are other issues as well.
There's a race between open() and disconnect(). The best way to deal
with it is to introduce a common semaphore for all devices the driver handles
and to take it as the first thing open() and disconnect() do and release it 
as the last thing. In addition every device needs a flag to show that it has
been opened and a flag to show that it has been unplugged. Alternatively
you could introduce device states, being "present and unused", "present and 
used" and "unplugged but used". As this needs to be checked in release(), it 
needs to take the semaphore as well.

	Regards
		Oliver

  parent reply	other threads:[~2002-10-07 10:03 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-06  2:58 John Tyner
2002-10-06 10:11 ` Oliver Neukum
2002-10-06 17:35   ` John Tyner
2002-10-06 22:01     ` Oliver Neukum
2002-10-06 23:25       ` John Tyner
2002-10-07  4:55         ` Oliver Neukum
2002-10-07  9:43         ` Oliver Neukum [this message]
2002-10-07 21:51           ` John Tyner
     [not found]           ` <001901c26e8d$3f62f850$0a00a8c0@refresco>
2002-10-08 16:30             ` [linux-usb-devel] " Oliver Neukum
  -- strict thread matches above, loose matches on Subject: below --
2002-10-06 21:32 John Tyner
2002-10-06 21:44 ` Oliver Neukum
2002-10-04  3:59 John Tyner
2002-10-04  4:50 ` Greg KH
2002-10-04  5:05   ` John Tyner
2002-10-04  5:22     ` Greg KH
2002-10-06  2:57   ` John Tyner
2002-10-06 21:06 ` Pavel Machek
2002-10-07 18:43   ` John Tyner

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=m17yUpC-006hzVC@Mail.ZEDAT.FU-Berlin.DE \
    --to=oliver@neukum.name \
    --cc=greg@kroah.com \
    --cc=jtyner@cs.ucr.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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

all inboxes | Powered by JetHome®