From: Stefan Richter <stefanr@s5r6.in-berlin.de>
To: Greg KH <gregkh@suse.de>
Cc: Kay Sievers <kay.sievers@vrfy.org>,
linux-kernel@vger.kernel.org, Jay Fenlason <fenlason@redhat.com>
Subject: Re: post 2.6.28 regression: device_initialize() now sleeps, and may fail without recovery strategy
Date: Fri, 09 Jan 2009 22:40:18 +0100 [thread overview]
Message-ID: <4967C442.3010301@s5r6.in-berlin.de> (raw)
In-Reply-To: <20090109213030.GA20553@suse.de>
Greg KH wrote:
> On Fri, Jan 09, 2009 at 10:13:55PM +0100, Stefan Richter wrote:
>> get_device() and put_device() seem to be about the only things that are
>> interesting before device_add().
...
> Hm, that could be pretty simple to handle. I'd really like to force the
> kobject itself to be dynamic, and inside the private portion of the
> device structure. If I do that, then get_ and put_ would need to
> allocate the object if it wasn't present. But that would mean that
> get_device could sleep, which isn't the case today
That could be a problem.
> (put_device() can always sleep, that's not an issue.)
Hmm, I wasn't aware of that, need to check my code...
...
>> Well, at least code which allocates struct device can check for failure
>> and handle it, while the allocator of dev->p can't even check. Unless
>> you change device_initialize() to return error status and add error
>> handling all over the place...
>
> yeah, that would be a much bigger task than I'm really pondering,
> although it probably is the correct thing to do...
If you inline struct device_private into struct device, then the problem
is gone. But then it's a little less private then you wanted it to be
of course.
--
Stefan Richter
-=====-==--= ---= -=--=
http://arcgraph.de/sr/
next prev parent reply other threads:[~2009-01-09 21:40 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-09 18:35 Stefan Richter
2009-01-09 19:49 ` [PATCH post 2.6.28] firewire: core: fix sleep in atomic context due to driver core change Stefan Richter
2009-01-09 21:17 ` Alan Cox
2009-01-09 21:54 ` Greg KH
2009-01-09 22:28 ` [git pull] FireWire fix Stefan Richter
2009-01-09 20:56 ` post 2.6.28 regression: device_initialize() now sleeps, and may fail without recovery strategy Greg KH
2009-01-09 21:13 ` Stefan Richter
2009-01-09 21:20 ` Stefan Richter
2009-01-09 21:34 ` Greg KH
2009-01-09 21:30 ` Greg KH
2009-01-09 21:40 ` Stefan Richter [this message]
2009-01-09 21:24 ` Alan Cox
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=4967C442.3010301@s5r6.in-berlin.de \
--to=stefanr@s5r6.in-berlin.de \
--cc=fenlason@redhat.com \
--cc=gregkh@suse.de \
--cc=kay.sievers@vrfy.org \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®