Subject: Re: How to protect pool operations from interrupts ?
To: None <salvet@ics.muni.cz>
From: Zdenek Salvet <salvet@ics.muni.cz>
List: tech-kern
Date: 06/12/2000 20:32:52
> Hello,
> 
> it seems that pool_get(), pool_put() etc. are protected from concurrent
> kernel threads with simple_lock(). But simple_lock does does nothing
> in !MULTIPROCESSOR case and does not block any interrupts.

Oops, disregard the following paragraph, I have made a mistake.
m_freem is protected, general pool question remains though ...

> I have seen the following scenario:
> 
> arpresolve()
>    m_freem()
>       -interrupt-
>         tulip...intr()
>             MGETHDR()
>             -crash-
> 
> Should we protect each m_freem() called from code running with lower spl
> ( s=splnet();m_freem();splx(s) ) or should pool protect itself like 
> malloc()/free() do ?
> 
> How about non-mbuf pools ?


-- 
Zdenek Salvet                                              salvet@ics.muni.cz 
Ustav vypocetni techniky Masarykovy univerzity, Brno
tel.: ++420-5-41 512 257                           fax: ++420-5-41 212 747
----------------------------------------------------------------------------
         God isn't dead, He's just trying to avoid the draft.