[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20100802124704.GA6050@albatros>
Date: Mon, 2 Aug 2010 16:47:04 +0400
From: Vasiliy Kulikov <segooon@...il.com>
To: Jesper Nilsson <Jesper.Nilsson@...s.com>
Cc: "kernel-janitors@...r.kernel.org" <kernel-janitors@...r.kernel.org>,
Mikael Starvik <mikael.starvik@...s.com>,
linux-cris-kernel <linux-cris-kernel@...s.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] cris: gpio: do not call
copy_to_user()/copy_from_user() while holding spinlocks
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@...il.com>
> Signed-off-by: Jesper Nilsson <jesper.nilsson@...s.com>
...
--
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