From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753558AbbJ3Okk (ORCPT ); Fri, 30 Oct 2015 10:40:40 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:38821 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751274AbbJ3Okj (ORCPT ); Fri, 30 Oct 2015 10:40:39 -0400 Date: Fri, 30 Oct 2015 07:40:37 -0700 From: Greg Kroah-Hartman To: Dmitry Torokhov Cc: htejun@gmail.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] sysfs: add devm_sysfs_create_group() and friends Message-ID: <20151030144037.GC27072@kroah.com> References: <20151030114706.GA2243@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151030114706.GA2243@localhost> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 30, 2015 at 04:47:06AM -0700, Dmitry Torokhov wrote: > Many drivers create additional driver-specific device attributes when > binding to the device and providing managed version of sysfs_create_group() > will simplify unbinding and error handling in probe path for such drivers. But they really shouldn't, because if they do this, they have raced userspace and tools don't know that the files are present. I don't want to encourage drivers to do this at all, so I don't want to make it easier for them to do things incorrectly. Yes, I know that input does this for its devices, but I still think it is wrong and should be changed. Let's not let this problem spread to other subsystems please. thanks, greg k-h