Re: [BUG] Problem since "block: make gendisk hold a reference toits queue"

From: Tejun Heo
Date: Tue Jan 10 2012 - 11:22:45 EST


Hello,

On Tue, Jan 10, 2012 at 03:11:10PM +0100, Dirk Gouders wrote:
> I noticed problematic kernel messages when my laptop boots, bisecting
> this issue lead me to commit 523e1d399c. I attach the messages that I
> currently (commit e4e11180df) see, please let me know if further
> information is needed.

Thank you very much for bisecting the problem.

> floppy0: no floppy controllers found
> =============================================================================
> BUG blkdev_queue: Poison overwritten
> -----------------------------------------------------------------------------

Yeah, floppy does some funky stuff during init.

> Object ffff88006ec30420: 6b 6b 6b 6b 6b 6b 6b 6b 6a 6b 6b 6b 6b 6b 6b 6b kkkkkkkkjkkkkkkk

This looks like refcnt is dec'd after released. Can you please apply
the following patch and see whether the WARN_ON() triggers?

diff --git a/block/blk-core.c b/block/blk-core.c
index 15de223..c3de15e 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -342,6 +342,7 @@ EXPORT_SYMBOL(blk_run_queue);

void blk_put_queue(struct request_queue *q)
{
+ WARN_ON(atomic_read(&q->kobj.kref.refcount) == 0x6b6b6b6b);
kobject_put(&q->kobj);
}
EXPORT_SYMBOL(blk_put_queue);
--
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/