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-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.44L0.0611221024340.3038-100000@iolanthe.rowland.org>
Date:	Wed, 22 Nov 2006 10:32:47 -0500 (EST)
From:	Alan Stern <stern@...land.harvard.edu>
To:	Cornelia Huck <cornelia.huck@...ibm.com>
cc:	Kernel development list <linux-kernel@...r.kernel.org>
Subject: Re: [Patch -mm 2/2] driver core: Introduce device_move(): move a
 device

Cornelia Huck wrote:

> +	if (old_parent)
> +		klist_del(&dev->knode_parent);
> +	klist_add_tail(&dev->knode_parent, &new_parent->klist_children);

> +			klist_del(&dev->knode_parent);
> +			if (old_parent)
> +				klist_add_tail(&dev->knode_parent,
> 						&old_parent->klist_children);

This is wrong.  klist_del() does not wait for the knode to be removed from 
its klist.  You need to use klist_remove().

I don't see any protection against new_parent being removed while dev is
being transferred under it.  Are you relying on the caller to make sure
this never happens?

Alan Stern

-
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