netdev
[Top] [All Lists]

Re: dev_alloc_skb / kmalloc proble (fwd)

To: netdev@xxxxxxxxxxx
Subject: Re: dev_alloc_skb / kmalloc proble (fwd)
From: "Yaroslav S. Polyakov" <xenon@xxxxxxxxxx>
Date: Wed, 18 Apr 2001 22:12:56 +0700 (NOVST)
Sender: owner-netdev@xxxxxxxxxxx
Hi!

 Can you please point me about where could be problem or may be show me
 the way I should dig?

 when porting my sbni network driver from 2.2.x to 2.4.x kernel I've got a
 problem:
        dev_alloc_skb (when I creating skb to fill it with packet from
        network card) sometimes creates skb with skb->head value 
        equal to address of my basic device dev structure.
        I create dev in my init_module procedure with call
        dev=kmalloc(sizeof(struct net_device),GFP_KERNEL);      

        BTW, as i've noticed driver works ok for the first time, but after
        I rmmod/insmod it again problem appears.

All the best!

                                      .
                         A burnt child dreads the fire.
                          Granch ltd.  Security Analyst
---------- Forwarded message ----------
Date: Wed, 18 Apr 2001 15:58:28 +0100 (BST)
From: Alan Cox <alan@xxxxxxxxxxxxxxxxxxx>
To: Yaroslav S. Polyakov <xenon@xxxxxxxxxx>
Cc: Alan.Cox@xxxxxxxxx
Subject: Re: dev_alloc_skb / kmalloc proble

>       dev_alloc_skb(size) sometimes returns skb where skb->head == dev.
>       dev is value I've got with 
>               dev=kmalloc(sizeof(struct net_device),GFP_KERNEL);
>       in my init_module(void) function.

That sounds like a miscompile more than anything

>       I think once kmalloced memory should NEVER be kmalloced again if
>       not kfree()'ed.

Correct. If it seems to be the net layer talk to netdev@xxxxxxxxxxx but I
suspect what is really going on is not so simple



<Prev in Thread] Current Thread [Next in Thread>
  • Re: dev_alloc_skb / kmalloc proble (fwd), Yaroslav S. Polyakov <=