From: Roland Dreier <rdreier@cisco.com>
To: Arjan van de Ven <arjan@infradead.org>
Cc: Peter Pearse <peter.pearse@arm.com>, linux-kernel@vger.kernel.org
Subject: Re: [RFC 4/7][PATCH] AMBA DMA: Add a driver module for the DMA controller.
Date: Mon, 30 Oct 2006 09:24:57 -0800 [thread overview]
Message-ID: <ada3b95yavq.fsf@cisco.com> (raw)
In-Reply-To: <1162210434.2948.13.camel@laptopd505.fenrus.org> (Arjan van de Ven's message of "Mon, 30 Oct 2006 13:13:54 +0100")
> this looks very very wrong to me.
Yes, the module reference counting needs to be completely redone.
This try_find_module() function is only used as:
> + pl080_driver.drv.owner = try_find_module(MODULE_NAME);
which as far as I can see should just be
pl080_driver.drv.owner = THIS_MODULE;
But there's also stuff like
> +static int pl080_request(dmach_t cnum, dma_t * cdata){
> + int retval = -EINVAL;
> +
> + /* Increase the usage */
> + if(try_module_get(pl080_driver.drv.owner)){
> + retval = 0;
> + }
which of course can never work -- this is inside the pl080 module so
it's already too late to take a reference.
The module refcounting just needs to be rethought.
- R.
prev parent reply other threads:[~2006-10-30 17:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-30 12:02 [RFC 4/7][PATCH] AMBA DMA: Add a driver module for the DMA controller Peter Pearse
2006-10-30 12:13 ` Arjan van de Ven
2006-10-30 17:24 ` Roland Dreier [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=ada3b95yavq.fsf@cisco.com \
--to=rdreier@cisco.com \
--cc=arjan@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peter.pearse@arm.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.