Re: Another Ndis MinportXXX question
From: Arkady Frenkel (arkadyf_at_hotmailxdotxcom)
Date: 01/10/05
- Next message: Wahyu: "Re: How to cancel IRP passed down to USBD"
- Previous message: Leo Havmøller: "Re: How to Enable/Disable USB Device Remote Wakeup?"
- In reply to: Alexander Grigoriev: "Re: Another Ndis MinportXXX question"
- Next in thread: Pavel A.: "Re: Another Ndis MinportXXX question"
- Reply: Pavel A.: "Re: Another Ndis MinportXXX question"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 10 Jan 2005 09:56:44 +0200
Correct , reentrancy can be supported but not in the same context
Arkady
"Alexander Grigoriev" <alegr@earthlink.net> wrote in message
news:#DxA1Yp9EHA.1392@tk2msftngp13.phx.gbl...
> With a spinlock, a deadlock occures just by acquiring the same lock second
> time in the same context.
>
> "Pavel A." <pavel_a@NOwritemeNO.com> wrote in message
> news:eqtQENo9EHA.2316@TK2MSFTNGP15.phx.gbl...
> > No, *I* can (of course, not by raising irql alone).
> > It *is* possible to handle reentrancy. The only real problem here
> > (as Alireza. pointed out) boils down to possibility of deadlock, when
> > a. Two or more locks are acquired in the code path;
> > b. Another path exists that acquires same locks in reverse order.
> > Now I'm trying to understand, are there other ways for NDIS miniport
> > to raise to dispatch, besides acquiring a spinlock.
> >
> > --PA
> >
> > "Alexander Grigoriev" <alegr@earthlink.net> wrote in message
> > news:u4qTQOm9EHA.2680@TK2MSFTNGP09.phx.gbl...
> >> You cannot sync between passive and DPC by raising IRQL.
> >> In your protected code sections, you should not call any external
> >> functions
> >> that can cause reentrancy.
> >>
> >> "Pavel A." <pavel_a@NOwritemeNO.com> wrote in message
> >> news:6E11725C-3DE1-4661-AAD6-927F4A8B4A74@microsoft.com...
> >> > "Alireza Dabagh [MS]" wrote:
> >> >> Without going through details below, I want to point out that if you
> >> >> use
> >> >> a
> >> >> flag that by checking it you could figure out if it is safe to call
> >> >> NDIS
> >> >> or
> >> >> not, you could use the same flag for protecting whatever it is that
> >> >> you
> >> >> want
> >> >> to protect by holding the spinlock. This is why I said by the time
you
> >> >> put
> >> >> the safeguard in, you can end up with a situation that you don't
need
> >> >> to
> >> >> acquire the spinlock.
> >> >
> >> > Ali, could you please explain how we can do this without spinlock.
> >> > When I need to sync between passive and DPCs, I have to get to
> >> > dispatch.
> >> > But NDIS spinlock seems to be the only way to raise to dispatch -
> >> > KeRaiseIrql is forbidden?
> >> >
> >> > Thanks
> >> > Pavel
> >> >
> >>
> >>
> >
> >
>
>
- Next message: Wahyu: "Re: How to cancel IRP passed down to USBD"
- Previous message: Leo Havmøller: "Re: How to Enable/Disable USB Device Remote Wakeup?"
- In reply to: Alexander Grigoriev: "Re: Another Ndis MinportXXX question"
- Next in thread: Pavel A.: "Re: Another Ndis MinportXXX question"
- Reply: Pavel A.: "Re: Another Ndis MinportXXX question"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|