From: Frederic Weisbecker <fweisbec@gmail.com>
To: Jonathan Cameron <jic23@cam.ac.uk>
Cc: LKML <linux-kernel@vger.kernel.org>,
Zhang Rui <rui.zhang@intel.com>,
Jean Delvare <khali@linux-fr.org>,
Rodolfo Giometti <giometti@enneenne.com>,
"Michele De Candia (VT)" <michele.decandia@valueteam.com>,
Linux I2C <linux-i2c@vger.kernel.org>
Subject: Re: [PATCH V2] ALS: TSL2550 driver move from i2c/chips
Date: Sat, 17 Oct 2009 19:07:20 +0200 [thread overview]
Message-ID: <20091017170718.GB10344@nowhere> (raw)
In-Reply-To: <4AD9F750.9090800@cam.ac.uk>
On Sat, Oct 17, 2009 at 05:56:48PM +0100, Jonathan Cameron wrote:
> +static int tsl2550_get_id(void)
> +{
> + int ret, val;
> +
> +idr_again:
> + if (unlikely(idr_pre_get(&tsl2550_idr, GFP_KERNEL) == 0))
> + return -ENOMEM;
> + spin_lock(&tsl2550_idr_lock);
> + ret = idr_get_new(&tsl2550_idr, NULL, &val);
> + if (unlikely(ret == -EAGAIN))
> + goto idr_again;
That looks like a fair chance to produce a deadlock
by reacquiring the above spinlock.
Also I never see the above lock released later from this
function or its caller.
next prev parent reply other threads:[~2009-10-17 17:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-17 16:56 [PATCH V2] ALS: TSL2550 driver move from i2c/chips Jonathan Cameron
2009-10-17 17:07 ` Frederic Weisbecker [this message]
2009-10-17 17:17 ` Jonathan Cameron
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=20091017170718.GB10344@nowhere \
--to=fweisbec@gmail.com \
--cc=giometti@enneenne.com \
--cc=jic23@cam.ac.uk \
--cc=khali@linux-fr.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michele.decandia@valueteam.com \
--cc=rui.zhang@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