[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20150407082533.GX16501@mwanda>
Date: Tue, 7 Apr 2015 11:25:33 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: Giedrius Statkevicius <giedrius.statkevicius@...il.com>
Cc: lidza.louina@...il.com, markh@...pro.net,
devel@...verdev.osuosl.org, gregkh@...uxfoundation.org,
driverdev-devel@...uxdriverproject.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/3] staging: dgnc: improve the coding style in unlocking
part of dgnc_tty_write()
On Tue, Apr 07, 2015 at 11:19:53AM +0300, Dan Carpenter wrote:
> On Tue, Apr 07, 2015 at 11:17:48AM +0300, Dan Carpenter wrote:
> > This patch changes the lock ordering (behavior change) and it's not
> > described in the changelog. Please figure out which way is the correct
> > ordering and resend.
>
> Actually the original ordering was obviously correct. You can't take
> a mutex if you are holding a spinlock. So it always has to be:
>
> mutex_lock();
> spin_lock();
>
> spin_unlock();
> mutext_unlock();
>
Oh, hm... You could take a mutex with trylock I suppose. That would be
safe.
Anyway, I just saw that you sent a v2 patch.
When you send a v2 patch, then you *must* send a reply to the original
thread. Greg has thousands and thousands of messages in his inbox and
he applies patches in chronological order. So he will apply this one
because it has not responses then get to the v2 patch and try to apply
that one as well which will fail.
regards,
dan carpenter
--
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