Re: [xen] double fault: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC

From: Linus Torvalds
Date: Wed Oct 09 2013 - 22:38:59 EST


On Wed, Oct 9, 2013 at 7:23 PM, Dave Airlie <airlied@xxxxxxxx> wrote:
>
> Well the commit that added it had a reason that seems to cover some other
> device model abuses, so maybe someone who actually understands the device
> model (all 2 people) can review usage

Actually, I think it's the same bug.

You *cannot* just reuse the storage. Doing a "memset()" doesn't
improve anything. The basic issue is that if you reuse it, you're
buggy. End of story.

Why? It's refcounted, and it's out of your hands. Reusing it is wrong
- because it might still be used. The fact that you "released" it is
immaterial. Others can have refcounts (and through /sys etc,
historically really do have them).

Linus
--
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/