This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: mbuf leakage in if_i82559.c ?


On Thu, 2003-11-20 at 05:34, Larice Robert wrote:
> Hello,
> 
> i think there is possible mbuf leakage in if_i82559.c
> could you please verify this ?
> 
> as far as i understand this, eth_drv.c hands over responsibility for mbufs
> to if_i82559.c with the parameter key of the function i82559_send(...key...)
> 
> later if_i82599.c gives them back to eth_drv.c with the parameter key
> of the function eth_drv_tx_done(...key...)
> 
> BUT, when i82559_send thinks its queue is full, it will simply drop this
> key. is this ok ? is there somewhere another cleanup mechanism which
> i've not seen so far ?
> 

This would be a leak - if it could happen.  However, it should never
happen since the XXX_send() routine will only be called if the 
XXX_can_send() routine says that the device has space.  So if there
*is* space, then the packet would not be dropped, so there is no leak.

-- 
Gary Thomas <gary@mlbassoc.com>
MLB Associates


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]