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: <ac3eb2510905231346n6f7ba736we0c4f9bce8e5e59f@mail.gmail.com>
Date:	Sat, 23 May 2009 22:46:27 +0200
From:	Kay Sievers <kay.sievers@...y.org>
To:	"Eric W. Biederman" <ebiederm@...ssion.com>
Cc:	Tejun Heo <tj@...nel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Greg Kroah-Hartman <gregkh@...e.de>,
	linux-kernel@...r.kernel.org,
	Cornelia Huck <cornelia.huck@...ibm.com>,
	linux-fsdevel@...r.kernel.org,
	"Eric W. Biederman" <ebiederm@...stanetworks.com>
Subject: Re: [PATCH 04/20] sysfs: Handle the general case of removing of 
	directories with subdirectories

On Sat, May 23, 2009 at 22:09, Eric W. Biederman <ebiederm@...ssion.com> wrote:
> Kay Sievers <kay.sievers@...y.org> writes:
>> What's the problem in /sys/dev/? There are just a bunch of symlinks,
>> one for every device with a dev_t, and all in flat directories, and no
>> directory to remove.
>
> device_shutdown called during reboot removes /sys/dev/block and /sys/dev/char.
> The current sysfs_remove_dir (because it empties directories)
> removes all of those symlinks.
>
> The problem is that it is the device objects for each individual
> device that owns those symlinks, and normally removes those symlinks.
>
> Which means that in theory we could have double deletion going on.
>
> In practice today it doesn't matter because this is at reboot.
>
> And as far as that goes it is wrong to remove anything from sysfs during
> device_shutdown so the fix is just to not call kobject_put there.

Yes, that's just a bug. These directories should never be removed.

Thanks,
Kay
--
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