public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeff Mahoney <jeffm@suse.com>
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Greg KH <gregkh@linux.com>,
	Linux Kernel Maling List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] kobject: introduce kobj_completion
Date: Wed, 11 Sep 2013 14:35:00 -0400	[thread overview]
Message-ID: <5230B7D4.5020405@suse.com> (raw)
In-Reply-To: <20130911172813.GL13318@ZenIV.linux.org.uk>

[-- Attachment #1: Type: text/plain, Size: 662 bytes --]

On 9/11/13 1:28 PM, Al Viro wrote:
> On Wed, Sep 11, 2013 at 01:00:30PM -0400, Jeff Mahoney wrote:
>> A common way to handle kobject lifetimes in embedded in objects with
>> different lifetime rules is to pair the kobject with a struct completion.
>>
>> This introduces a kobj_completion structure that can be used in place
>> of the pairing, along with several convenience functions for
>> initialization, release, and put-and-wait.
> 
> That's very easy to misuse, leading to deadlocks...

Misuse how? If you're using it any time other than shutting down an
object, you're shooting yourself in the foot.

-Jeff

-- 
Jeff Mahoney
SUSE Labs


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 841 bytes --]

      reply	other threads:[~2013-09-11 18:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-11 17:00 [PATCH] kobject: introduce kobj_completion Jeff Mahoney
2013-09-11 17:15 ` Greg KH
2013-09-11 18:37   ` Jeff Mahoney
2013-09-11 17:28 ` Al Viro
2013-09-11 18:35   ` Jeff Mahoney [this message]

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=5230B7D4.5020405@suse.com \
    --to=jeffm@suse.com \
    --cc=gregkh@linux.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@ZenIV.linux.org.uk \
    /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