From: Andrew Morton <akpm@linux-foundation.org>
To: Dan Carpenter <error27@gmail.com>
Cc: Maciej Sosnowski <maciej.sosnowski@intel.com>,
"David S. Miller" <davem@davemloft.net>,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] dca: missing unlock in unregister_dca_providers()
Date: Fri, 19 Nov 2010 14:59:37 -0800 [thread overview]
Message-ID: <20101119145937.60c5f688.akpm@linux-foundation.org> (raw)
In-Reply-To: <20101117051032.GC31724@bicker>
On Wed, 17 Nov 2010 08:10:32 +0300
Dan Carpenter <error27@gmail.com> wrote:
> We return here with the lock held and IRQs disabled by mistake.
>
> Signed-off-by: Dan Carpenter <error27@gmail.com>
>
> diff --git a/drivers/dca/dca-core.c b/drivers/dca/dca-core.c
> index b98c676..b4c95be 100644
> --- a/drivers/dca/dca-core.c
> +++ b/drivers/dca/dca-core.c
> @@ -110,8 +110,10 @@ static void unregister_dca_providers(void)
>
> /* at this point only one domain in the list is expected */
> domain = list_first_entry(&dca_domains, struct dca_domain, node);
> - if (!domain)
> + if (!domain) {
> + spin_unlock_irqrestore(&dca_lock, flags);
> return;
> + }
>
> list_for_each_entry_safe(dca, _dca, &domain->dca_providers, node) {
> list_del(&dca->node);
I think the code's just bogus, actually.
list_first_entry(&dca_domains) can't return NULL.
next prev parent reply other threads:[~2010-11-19 23:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-17 5:10 [patch] dca: missing unlock in unregister_dca_providers() Dan Carpenter
2010-11-19 22:59 ` Andrew Morton [this message]
2010-11-20 18:10 ` [patch v2] dca: remove unneeded NULL check Dan Carpenter
2010-11-22 16:49 ` Sosnowski, Maciej
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=20101119145937.60c5f688.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=error27@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maciej.sosnowski@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox