Re: BSOD: A wait operation, attach process or yield was attempted from DPC routine?

Good Amit,

                Go ahead…:wink:

Good Luck,



From: “Amit Manocha”

>Reply-To: “NT Developers Interest List”
>To: “NT Developers Interest List”
>Subject: [ntdev] Re: BSOD: A wait operation, attach process or yield was attempted from DPC routine?
>Date: Wed, 7 May 2003 14:48:38 +0530
>
>Thanks Yogi,
>
>It works. I only changed the priority to HighPagePriority in NdisQueryBufferSafe.
>
>Amit Manocha
> ----- Original Message -----
> From: yatindra vaishnav
> To: NT Developers Interest List
> Sent: Wednesday, May 07, 2003 2:23 PM
> Subject: [ntdev] Re: BSOD: A wait operation, attach process or yield was attempted from DPC routine?
>
>
> Hi Amit,
>
> Please See inlines.
>
> Good Luck,
>
>
>
> >From: “Amit Manocha”
> >Reply-To: “NT Developers Interest List”
> >To: “NT Developers Interest List”
> >Subject: [ntdev] BSOD: A wait operation, attach process or yield was attempted from DPC routine?
> >Date: Wed, 7 May 2003 09:48:11 +0530
> >
> >Hi All,
> >
> >I added following code in MPSend (in passthru sample) which is causing a
> >BSOD having message written in subject line.
> >
> > > // For Copying the entire contents into temp
> > > // 1. allocate memory
> > > NdisQueryPacket (Packet, NULL, NULL, NULL, &TotalBufferLength);
> > > temp = ExAllocatePool (NonPagedPool, TotalBufferLength); // tried
> >PagedPool also
>
> <-------------------------Yogi------------------------->
>
> Never use PagedPool, coz this interface runs at DISPATCH_LEVEL so will crash the system.
>
> <-----------------Yogi--------------------------->
>
> > > acclen = 0;
> > > if (temp != NULL)
> > > {
> > > NdisGetFirstBufferFromPacket (MyPacket, &fbdesc, &buffdata,
> >&bufflen, &totlen);
>
> <-----------------Yogi--------------------------->
>
> Where us this MyPacket Variable? Is it the same as of Packet?
>
> What i suggest here is use full functionality of Kernel Interface “NdisQueryPacket” Which will give the Buffer address of the first buffer from the list of buffers attached with the NDIS_PACKET. and use the calls like “NdisQueryBufferSafe” at the buffer pointer provided by the “NdisQueryPacket”.
>
> <-----------------Yogi--------------------------->
>
> > > do
> > > {
> > > NdisQueryBufferSafe (fbdesc, &buffdata, &currbufflen, 16);
>
> <-----------------Yogi--------------------------->
>
> Use HighPagePriority for the priority.
>
> <-----------------Yogi--------------------------->
>
> >
> > > if (buffdata == NULL)
> > > break;
> >
> > > NdisMoveMemory ((PVOID )(temp + acclen), buffdata,
> >currbufflen);
> > > acclen += currbufflen;
> >
> > > // 2. get the next buffer until it returns null
> > > NdisGetNextBuffer (fbdesc, &nbdesc);
> >
> > > fbdesc = nbdesc;
> > > } while (fbdesc != NULL);
> > >
> > > for (i = 0; i < TotalBufferLength; i ++)
> > > DbgPrint (“%d”, *((char *) temp + i));
> > >
> > > ExFreePool (temp);
> > > }
> >
> >
> >Any clues ?
> >
> >
> >
> >—
> >You are currently subscribed to ntdev as: xxxxx@hotmail.com
> >To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
>------------------------------------------------------------------------------
> IIFA Awards. Vote now. Celebrate Indian cinema. —
> You are currently subscribed to ntdev as: xxxxx@mynetsec.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
>—
>You are currently subscribed to ntdev as: xxxxx@hotmail.com
>To unsubscribe send a blank email to xxxxx@lists.osr.com


Can write well? Let’s talk. Right now!