From: Alex Courbot <acourbot@nvidia.com>
To: Grant Likely <grant.likely@secretlab.ca>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Linus Walleij <linus.walleij@linaro.org>,
Alexandre Courbot <gnurou@gmail.com>
Subject: Re: [PATCH] gpiolib: Fix locking on gpio debugfs files
Date: Mon, 11 Feb 2013 13:28:38 +0900 [thread overview]
Message-ID: <51187376.2060106@nvidia.com> (raw)
In-Reply-To: <1360406062-14982-1-git-send-email-grant.likely@secretlab.ca>
On 02/09/2013 07:34 PM, Grant Likely wrote:
> The debugfs files really need to hold the gpiolib spinlock before
> accessing the list. Otherwise chip addition/removal will cause an oops.
>
> Cc: Alexandre Courbot <acourbot@nvidia.com>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Tested-by: Alexandre Courbot <acourbot@nvidia.com>
Just wondering: if we manage to change this spinlock into a mutex in the
future, wouldn't it be better to acquire it only once in
gpiolib_seq_start() and release it in gpiolib_seq_stop()?
Even though the protection introduced by this patch definitely improves
the situation, it seems to me that chips could still be removed while
being displayed by gpiolib_seq_show().
Thanks,
Alex.
next prev parent reply other threads:[~2013-02-11 4:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-09 10:34 [PATCH] gpiolib: Fix locking on gpio debugfs files Grant Likely
2013-02-11 4:28 ` Alex Courbot [this message]
2013-02-11 11:31 ` Grant Likely
2013-02-12 2:27 ` Alexandre Courbot
2013-02-11 14:31 ` Linus Walleij
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=51187376.2060106@nvidia.com \
--to=acourbot@nvidia.com \
--cc=gnurou@gmail.com \
--cc=grant.likely@secretlab.ca \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.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).