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: <20141105035224.GB9419@kroah.com>
Date:	Tue, 4 Nov 2014 19:52:24 -0800
From:	Greg KH <gregkh@...uxfoundation.org>
To:	Tejun Heo <tj@...nel.org>
Cc:	Yijing Wang <wangyijing@...wei.com>,
	Weng Meiling <wengmeiling.weng@...wei.com>,
	Frans Klaver <fransklaver@...il.com>,
	Jens Axboe <axboe@...nel.dk>, akpm@...ux-foundation.org,
	adilger.kernel@...ger.ca, Jan Kara <jack@...e.cz>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Xiang Rui <rui.xiang@...wei.com>,
	Li Zefan <lizefan@...wei.com>,
	Huang Qiang <h.huangqiang@...wei.com>,
	Zhao Hongjiang <zhaohongjiang@...wei.com>
Subject: Re: Subject: [PATCH] kobject: fix the race between kobject_del and
 get_device_parent

On Tue, Nov 04, 2014 at 10:29:43PM -0500, Tejun Heo wrote:
> Hello,
> 
> On Wed, Nov 05, 2014 at 11:27:39AM +0800, Yijing Wang wrote:
> > Keep the parent directory looks good to me,  we could only add kobject_get(&parent)
> > after the parent dir be created.
> > 
> > ....
> > 		/* or create a new class-directory at the parent device */
> > 		k = class_dir_create_and_add(dev->class, parent_kobj);
> > 		/* do not emit an uevent for this simple "glue" directory */
> > 		kobject_get(k);  <--------add parent ref count for first child device.
> 
> The created directory would already have the base ref.  I don't think
> you need the above.  Just never put the parent once created.
> 
> Greg, how does this sound to you?

It makes sense, but I don't understand, what "parent" directory is going
away and causing problems?

thanks,

greg k-h
--
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