On Tue, 3 Nov 1998, klein fabien wrote:

> kmalloc called nonatomically from interrupt 0007d0
> 
> And then linux crash!!

You must use GFP_ATOMIC when you are calling kmalloc from an interrupt
service routine or a bottom-half handler!!! For example:

        char *p = kmalloc(10, GFP_ATOMIC);


> Am i not allowed to kmalloc buffer inside the hard_start_tx function??

If I recall correctly, that function may be called from bottom-half processing
code.  Bottom half processing may be initiated during interrupt processing, as
well as in the scheduler or at system call return time. Therefore, code run
from bottom-half callbacks must be treated with the same care as interrupt
service routines.  If such code needs dynamic memory, use atomic requests.

-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]

Reply via email to