summaryrefslogtreecommitdiffstats
path: root/fs/block_dev.c
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2007-11-19 10:53:40 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2008-01-24 20:40:36 -0800
commit09f82ea92822a7bbb7e816508abbda47ed54a77f (patch)
tree059011e094839a633597c2e88afc40f779894438 /fs/block_dev.c
parent97c146ef075dc40ae34407c03d3860fc3850b8e8 (diff)
downloadop-kernel-dev-09f82ea92822a7bbb7e816508abbda47ed54a77f.zip
op-kernel-dev-09f82ea92822a7bbb7e816508abbda47ed54a77f.tar.gz
Kobject: drop child->parent ref at unregistration
This patch (as1015) reverts changes that were made to the driver core about four years ago. The intent back then was to avoid certain kinds of invalid memory accesses by leaving kernel objects allocated as long as any of their children were still allocated. The original and correct approach was to wait only as long as any children were still _registered_; that's what this patch reinstates. This fixes a problem in the SCSI core made visible by the class_device to regular device conversion: A reference loop (scsi_device holds reference to request_queue, which is the child of a gendisk, which is the child of the scsi_device) prevents the data structures from being released, even though they are deregistered okay. It's possible that this change will cause a few bugs to surface, things that have been hidden for several years. They can be fixed easily enough by having the child device take an explicit reference to the parent whenever needed. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'fs/block_dev.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud