Re: cdevsw close never called
Re: cdevsw close never called
- Subject: Re: cdevsw close never called
- From: mm w <email@hidden>
- Date: Fri, 6 Mar 2009 13:06:56 -0800
Ok Andrew, I misunderstood in the first place,
it's because someone is knocking the door when you want to remove it
kstart:
create dev
kstop:
remove dev failed because something is using it
kstart again failed device existing
is that your case?
On Fri, Mar 6, 2009 at 12:41 PM, Andrew Gallatin <email@hidden> wrote:
> mm w wrote:
>>
>> Hello Andrew,
>>
>> a simple question,
>>
>> A has opened /dev/file000
>> B for obscur reason wants to access /dev/file000 (could create an alias)
>
> B is a process out of my control, looking for something to open, and
> is iterating over file0..N, attempting to open each one until
> he succeeds or runs out of device nodes to try.
> Heck, it is a potentially malicious program opening and closing each
> device node in a tight loop, for all I know. I've got to deal with
> whatever happens in the wild.
>
>> tuple processes
>>
>> if (proc (A...B C...) hold /dev/file000 || /dev/file000 on job)
>> return copy refA;
>> else
>> ... open stuff
>>
>> I think it's at your design level that you have to deal with that
>> you have to create your own stack to know what's going on, but maybe
>> there is a prebuilt
>> stuff to handle it I don't know, but I almost sure not
>
> I'm not sure what you mean. I don't control anything in userspace.
> I only control the driver side. I'd love to have a factory device like
> Solaris, which sort of does what I think you're trying to describe.
> But I've got to work with what I'm given.
>
> The underlying statement remains: It really looks like there might
> be a bug in Darwin's implementation of last close semantics for
> device nodes, which can lead to a driver's close never getting
> called.
>
> Drew
>
>
--
-mmw
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden