[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20101119145937.60c5f688.akpm@linux-foundation.org>
Date: Fri, 19 Nov 2010 14:59:37 -0800
From: Andrew Morton <akpm@...ux-foundation.org>
To: Dan Carpenter <error27@...il.com>
Cc: Maciej Sosnowski <maciej.sosnowski@...el.com>,
"David S. Miller" <davem@...emloft.net>,
linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [patch] dca: missing unlock in unregister_dca_providers()
On Wed, 17 Nov 2010 08:10:32 +0300
Dan Carpenter <error27@...il.com> wrote:
> We return here with the lock held and IRQs disabled by mistake.
>
> Signed-off-by: Dan Carpenter <error27@...il.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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists