lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20071126145810.eb848f23.akpm@linux-foundation.org>
Date:	Mon, 26 Nov 2007 14:58:10 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Alan Stern <stern@...land.harvard.edu>
Cc:	greg@...ah.com, kay.sievers@...y.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Kobjects: drop child->parent ref at unregistration

On Mon, 19 Nov 2007 10:53:40 -0500 (EST)
Alan Stern <stern@...land.harvard.edu> wrote:

> 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.

What happened with this?

> 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.
> 

How will such bugs manifest?  Ideally via a nice printk and a stack trace
followed by damage avoidance.

If it's via a mysterious crash or something similarly obscure then can we
improve that?

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ