From: David Lamparter <equinox-cEeocvCgqOOsTnJN9+BGXg@public.gmane.org>
To: Sebastian Andrzej Siewior
<bigeasy-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
Cc: dirk.brandewie-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
David Brownell
<dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
Subject: Re: spi/spi: don't release the spi device twice
Date: Tue, 23 Nov 2010 01:43:01 +0100 [thread overview]
Message-ID: <20101123004301.GA1034746@jupiter.n2.diac24.net> (raw)
In-Reply-To: <20101122133503.GA25553-Hfxr4Dq0UpYb1SvskN2V4Q@public.gmane.org>
On Mon, Nov 22, 2010 at 01:35:03PM -0000, Sebastian Andrzej Siewior wrote:
> According to my debug printks, the loop
>
> | dummy = device_for_each_child(master->dev.parent, &master->dev,
> | __unregister);
>
> calls __unregister for all childs of spi devicee (spidev in my case) and
> the spi device itself. So calling device_unregister() for the device
> itself leads to trouble.
> This seems to be comming from 3486008 aka ("spi: free children in
> spi_unregister_master, not siblings") so therefore I cc stable for v36.
This code is the old code, before patch 3486008 which you're citing.
3486008 does:
- dummy = device_for_each_child(master->dev.parent, &master->dev,
- __unregister);
+ dummy = device_for_each_child(&master->dev, NULL, __unregister);
Considering that this patch is in 2.6.36 (and 36.1), you seem to have
mixed up your sources. Please make sure your checkout is current and
unbroken...
> This is on v2.6.37-rc1. Unless this got fixed somewhere else in the
> meantime it is still there.
"Mu."
> --- a/drivers/spi/spi.c
> +++ b/drivers/spi/spi.c
> @@ -586,7 +586,6 @@ void spi_unregister_master(struct spi_master *master)
>
> dummy = device_for_each_child(master->dev.parent, &master->dev,
> __unregister);
> - device_unregister(&master->dev);
> }
This patch does, consequently, not apply on 2.6.37-rc, since the code
doesn't look like that anymore after 3486008...
-David
------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
next prev parent reply other threads:[~2010-11-23 0:43 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-22 13:35 [PATCH] spi/spi: don't release the spi device twice Sebastian Andrzej Siewior
[not found] ` <20101122133503.GA25553-Hfxr4Dq0UpYb1SvskN2V4Q@public.gmane.org>
2010-11-23 0:43 ` David Lamparter [this message]
[not found] ` <20101123004301.GA1034746-sd4rSCkhOesKVZNVnti56SRbHCANfdcW@public.gmane.org>
2010-11-23 10:33 ` Sebastian Andrzej Siewior
[not found] ` <4CEB985F.90805-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
2010-11-23 14:24 ` Feng Tang
2010-11-23 14:59 ` [PATCH v2] " Sebastian Andrzej Siewior
[not found] ` <20101123145910.GA23880-Hfxr4Dq0UpYb1SvskN2V4Q@public.gmane.org>
2010-11-23 16:45 ` David Lamparter
[not found] ` <20101123164520.GA1384937-sd4rSCkhOesKVZNVnti56SRbHCANfdcW@public.gmane.org>
2010-11-24 7:59 ` Feng Tang
2010-12-09 16:06 ` [v2] " Sebastian Andrzej Siewior
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=20101123004301.GA1034746@jupiter.n2.diac24.net \
--to=equinox-ceeocvcgqoostnjn9+bgxg@public.gmane.org \
--cc=bigeasy-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org \
--cc=dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
--cc=dirk.brandewie-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.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;
as well as URLs for NNTP newsgroup(s).