[ros-bugs] [Bug 4428] [PATCH] Fix bugcheck in NdisMFreeSharedMemory (happend with 3Com 3C905 TX-M)

ReactOS.Bugzilla at www.reactos.org ReactOS.Bugzilla at www.reactos.org
Tue Apr 28 00:51:58 CEST 2009


http://www.reactos.org/bugzilla/show_bug.cgi?id=4428





--- Comment #6 from Haos <olaf_siejka at o2.pl>  2009-04-28 00:51:57 CET ---
[00:27:38] <tamlin> Wold perhaps a work item fix this (storing addr(s)
obviously!)?
[00:29:27] <tamlin> From my understanding: The problem seems to be that the
struct holding the address is free'd before the address pointed to by a member
in the struct is free'd. Is that a correct understanding?
[00:30:36] <tamlin> The problem is free'ing the parent, before free'ing all the
children it holds?
[00:32:35] <zimme> tamlin: yes it would happend in the thread. The thread is
because the function NdisMFreeSharedMemoryPassive must call at PASSIV_LEVEL
[00:33:32] <tamlin> but the call wanting to generate this can come from... DPC,
or at least APC level?
[00:35:44] <tamlin> If so, It's a job for a work item I'd say. Allocate (npage)
(preferrably lookaside) memory, store what's needed, and hand it of to a
helper-workitem at passive level.
[00:36:16] <tamlin> Optionally!
[00:37:44] <tamlin> As this is driver specific, could we simply add a list to
ndis "to_free_at_passive_level_mem"? :-)
[00:38:13] <zimme> .. a driver call the function NdisMFreeSharedMemory with a
higher IRQL
[00:38:27] <tamlin> Right.
[00:38:45] <tamlin> And mem it holds, needs to be released at paasive level. 
[00:39:29] <tamlin> Then queue a workitem to do just that.
[00:40:01] <tamlin> And as I already wrote, preferrably from a lookaside list
(in case this is frequent).
[00:40:46] <zimme> KeLowerIrql(PASSIV_LEVEL) :-)
[00:40:58] <tamlin> If it's infrequent, just use npaged pool (which is
required, as this can come from a higher IRQL).
[00:41:40] <tamlin> zimme: Don't even think about it! Do you even know what
might get dispatched on a transition down to PASSIVE_LEVEL?
[00:44:55] <tamlin> It's easy. Just store what adress(es) need to be released
inside a srtuct handed over to a workitem for this (sure, you need to create
the worker function), and then release it all from PASSIVE_LEVEL when it
happens. Piece of cake! :-)
[00:46:13] <tamlin> It's like *all* things you need to do at a lower IRQL - you
tell the system "I need this done when you got the time".


Now pls fix!


-- 
Configure bugmail: http://www.reactos.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the Ros-bugs mailing list