Question on debugging use-after-free memory issues.

From: Ben Greear
Date: Mon Jun 27 2011 - 14:12:43 EST



I have a case where deleted memory is being passed into an RPC
callback. I enabled SLUB memory poisoning and verified that the
data pointed to has 0x6b...6b value.

Unfortunately, the rpc code is a giant maze of callbacks and I'm
having a difficult time figuring out where this data could be erroneously
deleted at.

So first question:

Given a pointer to memory, and with SLUB memory debuging on (and/or other
debugging options if applicable), is there a way to get any info about where
the memory was last deleted?

Second: Any other suggestions for how to go about debugging this?

I hit this problem under load after multiple hours, so just adding printks
in random places may not be feasible...

Thanks,
Ben

--
Ben Greear <greearb@xxxxxxxxxxxxxxx>
Candela Technologies Inc http://www.candelatech.com

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