kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vasiliy Kulikov <segooon@gmail.com>
To: Jesper Nilsson <Jesper.Nilsson@axis.com>
Cc: "kernel-janitors@vger.kernel.org"
	<kernel-janitors@vger.kernel.org>,
	Mikael Starvik <mikael.starvik@axis.com>,
	linux-cris-kernel <linux-cris-kernel@axis.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] cris: gpio: do not call
Date: Mon, 02 Aug 2010 12:47:04 +0000	[thread overview]
Message-ID: <20100802124704.GA6050@albatros> (raw)
In-Reply-To: <20100802113316.GJ9784@axis.com>

On Mon, Aug 02, 2010 at 13:33 +0200, Jesper Nilsson wrote:
> On Thu, Jul 29, 2010 at 03:32:18PM +0200, Kulikov Vasiliy wrote:
> > copy_to_user()/copy_from_user() must not be used with spinlocks held.
> > Move all cases of interaction with userspace out of global switch and
> > lock spinlocks only where they are needed.
> 
> Thanks, but I'm thinking we should move the spinlock inside each case instead,
> as in the below patch.
> Unless there's any protests I'll add it to the cris-tree in the next couple of days:

I'm fine with this.

> 
> CRIS: gpio: don't call copy_to_user()/copy_from_user() while holding spinlocks
> 
> copy_to_user()/copy_from_user() must not be used with spinlocks held.
> Move locks inside each case so we have better control of when the locks
> are held.
> 
> Also, since we use spinlocks, we don't need to hold the BKL, so remove it.
> 
> Reported-by: Kulikov Vasiliy <segooon@gmail.com>
> Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
...

      reply	other threads:[~2010-08-02 12:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-29 13:32 [PATCH] cris: gpio: do not call copy_to_user()/copy_from_user() while holding spinlocks Kulikov Vasiliy
2010-08-02 11:33 ` [PATCH] cris: gpio: do not call Jesper Nilsson
2010-08-02 12:47   ` Vasiliy Kulikov [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=20100802124704.GA6050@albatros \
    --to=segooon@gmail.com \
    --cc=Jesper.Nilsson@axis.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-cris-kernel@axis.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mikael.starvik@axis.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;
as well as URLs for NNTP newsgroup(s).