tech-net archive

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

Re: Memory leak in sys/external/bsd/ipf/netinet/ip_fil_netbsd.c:ipf_send_ip()?



>> you could also add a printf() to see if this code path is used.
> I'm not familiar with where in kernel code you can add printf()s.

Is there anywhere you can't?

Well, OK, there are probably a few places.  printf in the serial port
transmitter-empty interrupt when using serial console is probably a bad
idea.  Maybe the TLB miss handler, on architectures where there is one.
But, really, I've done printf debugging pretty close to everywhere in
the kernel that isn't as obviously dangerous as those.  Some places
will be performance issues, and there can be problems if you print more
than tiny amounts at elevated IPL - for example, with a HZ of 100 and
serial console at 9600 baud, you don't want to print more than a mean
of 9.6 bytes per interrupt in the hardclock handler.  But for something
like this?  I wouldn't hesitate.

/~\ The ASCII				  Mouse
\ / Ribbon Campaign
 X  Against HTML		mouse%rodents-montreal.org@localhost
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B


Home | Main Index | Thread Index | Old Index