From: Felipe Balbi <balbi@ti.com>
To: linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/3] video: fbdev: omap2: omapfb: remove __exit annotation
Date: Wed, 15 Oct 2014 15:54:11 +0000 [thread overview]
Message-ID: <20141015155411.GA15770@saruman> (raw)
In-Reply-To: <543E962C.2050505@ti.com>
[-- Attachment #1: Type: text/plain, Size: 2176 bytes --]
Hi,
On Wed, Oct 15, 2014 at 06:43:40PM +0300, Tomi Valkeinen wrote:
> >> Somehow omapfb device is still unbound from the driver, as I can then
> >> bind it again, causing probe to be called. Which breaks everything.
> >>
> >> I would've thought that unbinding is not possible if remove is missing,
> >> but that doesn't seem to be the case. I guess it just means that remove
> >> is not called when the driver & device are unbound.
> >
> > if no remove it provided on platform_driver structure, platform bus
> > assumes you have nothing to do on your ->remove(), so you end up leaking
> > all resources you allocated on ->probe() (unless you *really* don't need
> > to do anything on ->remove).
>
> Yep. That's quite odd, still. grep shows quite many uses of __exit_p(),
> and all for remove callback. So, if you have something to release in
> remove(), you should set it always, for both module and built-in. And if
> you don't have anything to release, you would always just set .release
> to NULL.
>
> I mean, what's the use case for __exit_p()? With a quick glance, at
> least some of the other users also use __exit_p() the same way omapdss
> does (i.e. in the wrong way).
__exit_p() meant something else a few years back, perhaps those were
left over from some tree-wide cleanups.
> >> We have 18 __exit_p()s in omapdss and related drivers. I guess they are
> >> all broken the same way.
> >
> > yup, I should've grepped.
> >
> >> Note that omapfb unbind & bind does not work even with this patch, but
> >> results in a crash as some old state is left into omapdss. The same
> >> happens also with unloading and loading omapfb module (but keeping
> >> omapdss module loaded).
> >
> > It worked fine for me. I unbound and bound omapfb multiple times.
>
> Hmm, ok. Odd, the bug was quite clear and I think it should happen every
> time. Well, I was using omap4. If you used AM4xx, that's basically omap3
> DSS. Maybe there's a diff there.
could very well be :-)
> >> So there seems to be more issues around this.
> >
> > quite a few more, I'd say
>
> Yep, I'll have a look at this.
alright
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
prev parent reply other threads:[~2014-10-15 15:54 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-14 18:28 [PATCH 1/3] video: fbdev: omap2: omapfb: remove __exit annotation Felipe Balbi
2014-10-14 18:28 ` [PATCH 2/3] video: fbdev: omap2: omapfb: add missing MODULE_ALIAS() Felipe Balbi
2014-10-14 18:34 ` Felipe Balbi
2014-10-15 12:46 ` Tomi Valkeinen
2014-10-15 14:37 ` Felipe Balbi
2014-10-15 12:20 ` Tomi Valkeinen
2014-10-15 14:38 ` Felipe Balbi
2014-10-15 15:45 ` Tomi Valkeinen
2014-10-14 18:28 ` [PATCH 3/3] arm: boot: dts: am437x-sk: fix lcd enable pin mux data Felipe Balbi
2014-10-15 12:24 ` Tomi Valkeinen
2014-12-04 14:43 ` Felipe Balbi
2014-12-04 15:05 ` Felipe Balbi
2014-10-15 12:13 ` [PATCH 1/3] video: fbdev: omap2: omapfb: remove __exit annotation Tomi Valkeinen
2014-10-15 14:41 ` Felipe Balbi
2014-10-15 15:43 ` Tomi Valkeinen
2014-10-15 15:54 ` Felipe Balbi [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=20141015155411.GA15770@saruman \
--to=balbi@ti.com \
--cc=linux-arm-kernel@lists.infradead.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).