From: Veaceslav Falico <vfalico@redhat.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: Rusty Russell <rusty@rustcorp.com.au>,
linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org,
bhelgaas@google.com
Subject: Re: [PATCH] module: add kset_obj_exists() and use it
Date: Thu, 11 Apr 2013 17:39:16 +0200 [thread overview]
Message-ID: <20130411153916.GH21320@redhat.com> (raw)
In-Reply-To: <20130411152003.GC20943@kroah.com>
On Thu, Apr 11, 2013 at 08:20:03AM -0700, Greg KH wrote:
>On Thu, Apr 11, 2013 at 03:53:40PM +0200, Veaceslav Falico wrote:
>> On Thu, Apr 11, 2013 at 06:28:31AM -0700, Greg KH wrote:
>> >On Thu, Apr 11, 2013 at 11:55:37AM +0200, Veaceslav Falico wrote:
...
>>
>> In both examples we don't look at that kobject, and only uselessly
>> _get()/_put() it. And it looks a bit ugly. After the patch, in both cases,
>> it takes only one call to kset_obj_exists() to find out if the object
>> exists at that time.
>
>But as your function does the same thing, logically it's the same code
>path :)
>
>Anyway, yes, I understand your point here, and in some new code I'm
>writing right now, we had to do much the same check as well. But as
>there are only 2 in-kernel users of this "pattern", I don't think it's
>justified to add a new api call for it, especially if it were to be
>misused as you were attempting to use it, which would only mask the real
>problem you were trying to solve.
Good point, it really might mask the real problem, as it would actually do
for the initial race.
>
>So, thanks for the idea, but for now, I'll pass.
Fair enough. Thank you for explaining :)
>
>thanks,
>
>greg k-h
next prev parent reply other threads:[~2013-04-11 15:39 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-09 11:22 [PATCH] module: add kset_obj_exists() and use it Veaceslav Falico
2013-04-10 7:17 ` Rusty Russell
2013-04-11 9:55 ` Veaceslav Falico
2013-04-11 13:28 ` Greg KH
2013-04-11 13:53 ` Veaceslav Falico
2013-04-11 15:20 ` Greg KH
2013-04-11 15:39 ` Veaceslav Falico [this message]
2013-04-15 2:26 ` Rusty Russell
2013-04-16 12:26 ` Veaceslav Falico
2013-04-17 3:55 ` Rusty Russell
2013-04-17 5:33 ` Veaceslav Falico
2013-04-10 17:27 ` Greg KH
2013-04-11 1:58 ` Rusty Russell
2013-04-11 5:05 ` Veaceslav Falico
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130411153916.GH21320@redhat.com \
--to=vfalico@redhat.com \
--cc=bhelgaas@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).