OOPS after adding new field to skbuff.c ?!?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

Let's say i have added a new field to skbuff.h : char pkt_nr[48].

Let's say i want to be able to say from within sch_generic.c which packets
are enqueued/dequeued (using pkt_nr field from skbuff).

So, continuing, i put ....

sprintf("Packet nr %s dequeued/enqueued",skb->pkt_nr);

.. inside sch_generic.c.

But this causes OOPS when i boot my kernel (of course after compilation). I
think this is because sch_generic is called even before pkt_nr was filled.

In 8139too.c (which receives packets) i do pkt_nr initialization:

 spritnf (skb->pkt_nr, val); // for every received pkt.


And i suppose sch_generic gets called even before line above... so it has
null pointer

My question is:

what should i do (and WHERE) to prevent "sprintf("Packet nr %s
dequeued/enqueued",skb->pkt_nr);" from crashing kernel ???

regards

adam

-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux