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: <5195C39F.9010101@asianux.com>
Date:	Fri, 17 May 2013 13:43:59 +0800
From:	Chen Gang <gang.chen@...anux.com>
To:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: [Consult] Why need we call device_remove_file() firstly before call
 device_unregister() ?

Hello All:

I searched 'arch/*' and 'drivers/*' sub-directory, all of them are 'obey
this rule', even in device_unregister() itself, it also firstly calls
device_remove_file(), then call kobject_del().

But after read the related code (fs/sysfs/*, drivers/base/core.c), it
seems kobject_del() -> sysfs_remove_dir() which will release all related
things (can instead of device_remove_file()).

So in fact, we need not call device_remove_file() before call
device_unregister(), is it correct ?


Welcome any member to give a suggestion or completion about it, thanks.


Thanks.
-- 
Chen Gang

Asianux Corporation
--
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