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: <20120524205952.GA16621@core.coreip.homeip.net>
Date:	Thu, 24 May 2012 13:59:52 -0700
From:	Dmitry Torokhov <dmitry.torokhov@...il.com>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
Cc:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org, linux-input@...r.kernel.org
Subject: Re: [git pull] Input updates for 3.5-rc0

On Thu, May 24, 2012 at 01:48:57PM -0700, Linus Torvalds wrote:
> On Thu, May 24, 2012 at 1:36 PM, Dmitry Torokhov
> <dmitry.torokhov@...il.com> wrote:
> >
> > Hmm, I guess we are better now with cleaning and turning devices into
> > zombies waiting to be reaped.
> 
> No, that wasn't the silly part of your statement.
> 
> The silly part is that
> 
>   dev_set_name(&dev->dev, "input-%s", dev_name(dev->dev.parent));
> 
> works perfectly fine if the parent goes away, for a damn simple
> reason: it generates the string *once*, and doesn't care one *whit*
> about the parent pointer ever again afterwards.

I was concerned about the _next_ device (the one that will be created
the moment I plug in the tablet back into the same port) having exact
same name as the one that is half dead and clashing in sysfs and
elsewhere. We used to have issues with this.

> 
> For exactly the same that your current
> 
>   dev_set_name(&dev->dev, "input%d", atomic_inc_return(&input_no) - 1);
> 
> doesn't care *at*all* about that "input_no" variable afterwards -
> dev_set_name() will have turned it into a string, and "input_no" can
> change as much as it wants, and that won't change the name of the
> device.

and it guarantees to make the name unique, that is all we need.

> 
> See? So no "refcounting parents" or "zombie devices" or any crap like
> that. The name is just a string.
> 
> Anyway, I can't be bothered to argue. If you think "input1" is such a
> great name, and then that results in nobody actually ever *using* it
> because everybody agrees it useless and will use something else,
> whatever.
> 
>                 Linus

-- 
Dmitry
--
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