Note that there are some explanatory texts on larger screens.

plurals
  1. POdebug kernel module (memory corruption_
    text
    copied!<p>I'm debugging my kernel module, which appears to have a memory corruption, basically a piece of memory allocated by alloc_netdev() for 'net_device' instance has been corrupted.</p> <p>1) I turned on <code>CONFIG_DEBUG_KERNEL</code>, <code>CONFIG_DEBUG_SLAB</code>, <code>CONFIG_DEBUG_KMEMLEAK</code> in my kernel's <code>.config</code>, however not sure what to expect from <code>kmemleak</code>. Is it supposed to print out a trace dump of suspected memory leaks whenever I read <code>/sys/kernel/debug/kmemleak</code>? Is there a way to reset the statistics/information accumulated by <code>kmemleak</code>? An the most important -- could anyone help to decipher the output, e.g. :</p> <pre><code>unreferenced object 0xc625e000 (size 2048): comm "swapper", pid 1, jiffies 4294937521 backtrace: [&lt;c00c89f0&gt;] create_object+0x11c/0x200 [&lt;c00c6764&gt;] __kmalloc_track_caller+0x138/0x178 [&lt;c01d78c0&gt;] __alloc_skb+0x4c/0x100 [&lt;c01d8490&gt;] dev_alloc_skb+0x18/0x3c [&lt;c0198b48&gt;] eth_rx_fill+0xd8/0x3fc [&lt;c019ac74&gt;] mv_eth_start_internals+0x30/0xf8 [&lt;c019c5fc&gt;] mv_eth_start+0x70/0x244 [&lt;c019c810&gt;] mv_eth_open+0x40/0x64 [&lt;c01e00f0&gt;] dev_open+0xb4/0x118 [&lt;c01df788&gt;] dev_change_flags+0x90/0x168 [&lt;c001a3e4&gt;] ip_auto_config+0x1bc/0xecc [&lt;c00212f4&gt;] do_one_initcall+0x5c/0x1bc [&lt;c00083d0&gt;] kernel_init+0x8c/0x108 [&lt;c0022f58&gt;] kernel_thread_exit+0x0/0x8 [&lt;ffffffff&gt;] 0xffffffff </code></pre> <p>2) I was also wondering if I could apply some "read-only" attribute on this memory, this way I expect to have <code>Oops</code> generated when someone tries to modify the memory. Does it sound reasonable?</p> <p>Appreciate any advices, thanks.</p> <p>Mark</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload