From: Greg Kroah-Hartman <gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>
To: Pantelis Antoniou
<pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>
Cc: Jean Delvare <jdelvare-l3A5Bk7waGM@public.gmane.org>,
Guenter Roeck <linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>,
Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>,
Matt Porter <matt.porter-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
Grant Likely
<grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>,
linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] [RFC] i2c: Don't wait for device release in i2c_del_adapter
Date: Thu, 15 Jan 2015 14:55:21 -0800 [thread overview]
Message-ID: <20150115225521.GA26542@kroah.com> (raw)
In-Reply-To: <E91AA1C8-64EE-4111-94BD-B8F05071D507-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>
On Thu, Jan 15, 2015 at 06:25:22PM +0200, Pantelis Antoniou wrote:
> Hi Greg,
>
> > On Jan 14, 2015, at 22:41 , Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote:
> >
> > On Wed, Jan 14, 2015 at 07:24:22PM +0200, Pantelis Antoniou wrote:
> >> I’ll try to dig around tomorrow and see what the real device reference counts
> >> are, but my hunch goes like this:
> >>
> >> MUX
> >> +—- ADAPTER
> >> +— DEV.
> >>
> >> Mux remove method is called, i2c_del_mux_adapter is called on all the channels
> >> of the mux, calling in turn i2c_del_adapter which hangs on completion of the
> >> dev_released.
> >>
> >> The call to device_unregister never calls the device_type callback (i2c_adapter_dev_release)
> >> because the reference count is not 1 at that point, someone else is having another
> >> reference.
> >
>
> First of all, my head hurts. Tracking device references ain’t easy. Is there some kind
> of debugging method you’d recommend for this?
You can turn on debugging for kobjects and the driver core if you want
to slow down your system log a bunch, but it can be helpful for trickier
issues. Or just sprinkle a few printks around.
> > I don't remember the i2c core code at all, that was a long time ago.
> >
>
> Bummer.
Do you remember code you wrote 12 year ago and haven't looked at for at
least 11? Why expect others to as well? :)
thanks,
greg k-h
next prev parent reply other threads:[~2015-01-15 22:55 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-12 17:00 [PATCH] [RFC] i2c: Don't wait for device release in i2c_del_adapter Pantelis Antoniou
[not found] ` <1421082050-10213-1-git-send-email-pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>
2015-01-13 15:29 ` Wolfram Sang
2015-01-14 13:49 ` Jean Delvare
[not found] ` <20150114144938.4e3c3f52-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
2015-01-14 13:54 ` Pantelis Antoniou
[not found] ` <B2D57D11-FBC2-432A-90E8-90E4CF8F716C-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>
2015-01-14 14:06 ` Michael Lawnick
[not found] ` <54B677DE.6030204-Mmb7MZpHnFY@public.gmane.org>
2015-01-14 14:12 ` Pantelis Antoniou
2015-01-14 14:14 ` Guenter Roeck
[not found] ` <54B679DC.40303-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
2015-01-14 14:18 ` Pantelis Antoniou
[not found] ` <AEACDB0B-BF24-422E-89E3-45B232E6E261-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>
2015-01-14 16:19 ` Guenter Roeck
2015-01-14 15:15 ` Jean Delvare
[not found] ` <20150114161525.49c54acc-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
2015-01-14 16:24 ` Guenter Roeck
[not found] ` <20150114162442.GB18578-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
2015-01-14 17:14 ` Jean Delvare
[not found] ` <20150114181426.3a39791b-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
2015-01-14 17:24 ` Pantelis Antoniou
[not found] ` <6680B42A-76E8-40CF-9574-ECD00B40AE98-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>
2015-01-14 20:41 ` Greg Kroah-Hartman
[not found] ` <20150114204122.GA31119-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2015-01-15 16:25 ` Pantelis Antoniou
[not found] ` <E91AA1C8-64EE-4111-94BD-B8F05071D507-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>
2015-01-15 22:55 ` Greg Kroah-Hartman [this message]
[not found] ` <20150115225521.GA26542-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2015-01-16 7:19 ` Pantelis Antoniou
2015-01-16 7:36 ` Jean Delvare
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=20150115225521.GA26542@kroah.com \
--to=gregkh-hqyy1w1ycw8ekmwlsbkhg0b+6bgklq7r@public.gmane.org \
--cc=grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org \
--cc=jdelvare-l3A5Bk7waGM@public.gmane.org \
--cc=linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=matt.porter-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w@public.gmane.org \
--cc=wsa-z923LK4zBo2bacvFa/9K2g@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).