linux/drivers/block/aoe
Ed Cashin 7135a71b19 aoe: allocate unused request_queue for sysfs
Andy Whitcroft reported an oops in aoe triggered by use of an
incorrectly initialised request_queue object:

  [ 2645.959090] kobject '<NULL>' (ffff880059ca22c0): tried to add
		an uninitialized object, something is seriously wrong.
  [ 2645.959104] Pid: 6, comm: events/0 Not tainted 2.6.31-5-generic #24-Ubuntu
  [ 2645.959107] Call Trace:
  [ 2645.959139] [<ffffffff8126ca2f>] kobject_add+0x5f/0x70
  [ 2645.959151] [<ffffffff8125b4ab>] blk_register_queue+0x8b/0xf0
  [ 2645.959155] [<ffffffff8126043f>] add_disk+0x8f/0x160
  [ 2645.959161] [<ffffffffa01673c4>] aoeblk_gdalloc+0x164/0x1c0 [aoe]

The request queue of an aoe device is not used but can be allocated in
code that does not sleep.

Bruno bisected this regression down to

  cd43e26f07

  block: Expose stacked device queues in sysfs

"This seems to generate /sys/block/$device/queue and its contents for
 everyone who is using queues, not just for those queues that have a
 non-NULL queue->request_fn."

Addresses http://bugs.launchpad.net/bugs/410198
Addresses http://bugzilla.kernel.org/show_bug.cgi?id=13942

Note that embedding a queue inside another object has always been
an illegal construct, since the queues are reference counted and
must persist until the last reference is dropped. So aoe was
always buggy in this respect (Jens).

Signed-off-by: Ed Cashin <ecashin@coraid.com>
Cc: Andy Whitcroft <apw@canonical.com>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Bruno Premont <bonbons@linux-vserver.org>
Cc: Martin K. Petersen <martin.petersen@oracle.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2009-09-09 14:10:18 +02:00
..
Makefile Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
aoe.h aoe: allocate unused request_queue for sysfs 2009-09-09 14:10:18 +02:00
aoeblk.c aoe: allocate unused request_queue for sysfs 2009-09-09 14:10:18 +02:00
aoechr.c Driver Core: aoe: add nodename for aoe devices 2009-06-15 21:30:26 -07:00
aoecmd.c aoe: Remove superfluous clearing of skb fields in new_skb(). 2009-05-27 17:09:44 -07:00
aoedev.c aoe: allocate unused request_queue for sysfs 2009-09-09 14:10:18 +02:00
aoemain.c aoe: Use SKB interfaces for list management instead of home-grown stuff. 2008-09-21 22:36:49 -07:00
aoenet.c net: convert usage of packet_type to read_mostly 2009-03-10 05:22:43 -07:00