Re: [PATCH 04/26] sysfs: sysfs_remove_dir stop checking for bogus cases.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, May 29, 2009 at 01:19:14PM -0700, Eric W. Biederman wrote:
> From: Eric W. Biederman <ebiederm@xxxxxxxxxxxx>
> 
> kobj->sd can not be NULL in sysfs_remove_dir.
> 
> sysfs_remove_dir is only called from kobject_add (to clean up after failure)
> and from kobject_del at the end of a kobject's life.  In both cases kobject_add
> has already called sysfs_create_dir successfully.  The only writers of
> kobj->sd are sysfs_create_dir on sucess and sysfs_remove_dir when it clears
> the kobj just before deleting the directory.
> 
> Which means at the time sysfs_remove_dir is called kobj->sd will be
> valid.

Yeah, we would hope so.

But as we have been forced to add many checks like this into the driver
core to handle those "no one could ever call this" type problems that
have been springing up over time, I am hesitant to remove this check.

Why do you want to remove it, what is the problem here you are trying to
solve?

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux