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

From: Adam Flizikowski (adam_fli@poczta.onet.pl)
Date: Thu Aug 14 2003 - 07:59:54 EST


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 ???



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