public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pohmelfs/dir.c: Remove unneeded mutex_unlock() from  pohmelfs_rename()
@ 2011-01-19 21:13 Alexey Khoroshilov
  2011-01-20 10:51 ` Evgeniy Polyakov
  0 siblings, 1 reply; 3+ messages in thread
From: Alexey Khoroshilov @ 2011-01-19 21:13 UTC (permalink / raw)
  To: Evgeniy Polyakov
  Cc: Greg Kroah-Hartman, Tejun Heo, Ruslan Pisarev, devel,
	linux-kernel

I do not see any reason for the mutex_unlock(&inode->i_mutex); in
pohmelfs_rename().


Found by Linux Driver Verification project (linuxtesting.org).


Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
---
diff --git a/drivers/staging/pohmelfs/dir.c b/drivers/staging/pohmelfs/dir.c
index 059e9d2..9732a96 100644
--- a/drivers/staging/pohmelfs/dir.c
+++ b/drivers/staging/pohmelfs/dir.c
@@ -1082,7 +1082,6 @@ err_out_exit:

        clear_bit(NETFS_INODE_REMOTE_SYNCED, &pi->state);

-       mutex_unlock(&inode->i_mutex);
        return err;
 }


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] pohmelfs/dir.c: Remove unneeded mutex_unlock() from pohmelfs_rename()
  2011-01-19 21:13 [PATCH] pohmelfs/dir.c: Remove unneeded mutex_unlock() from pohmelfs_rename() Alexey Khoroshilov
@ 2011-01-20 10:51 ` Evgeniy Polyakov
  2011-01-20 15:52   ` Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: Evgeniy Polyakov @ 2011-01-20 10:51 UTC (permalink / raw)
  To: Alexey Khoroshilov
  Cc: Greg Kroah-Hartman, Tejun Heo, Ruslan Pisarev, devel,
	linux-kernel

On Thu, Jan 20, 2011 at 12:13:44AM +0300, Alexey Khoroshilov (khoroshilov@ispras.ru) wrote:
> I do not see any reason for the mutex_unlock(&inode->i_mutex); in
> pohmelfs_rename().
> 
> 
> Found by Linux Driver Verification project (linuxtesting.org).

Yes, that's a bug, we already unlocked i_mutex in common path and should
not do that on error.

Thank you. Greg, please apply.

> Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>

Acked-by: Evgeniy Polyakov <zbr@ioremap.net>

-- 
	Evgeniy Polyakov

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] pohmelfs/dir.c: Remove unneeded mutex_unlock() from pohmelfs_rename()
  2011-01-20 10:51 ` Evgeniy Polyakov
@ 2011-01-20 15:52   ` Greg KH
  0 siblings, 0 replies; 3+ messages in thread
From: Greg KH @ 2011-01-20 15:52 UTC (permalink / raw)
  To: Evgeniy Polyakov
  Cc: Alexey Khoroshilov, Tejun Heo, Ruslan Pisarev, devel,
	linux-kernel

On Thu, Jan 20, 2011 at 01:51:13PM +0300, Evgeniy Polyakov wrote:
> On Thu, Jan 20, 2011 at 12:13:44AM +0300, Alexey Khoroshilov (khoroshilov@ispras.ru) wrote:
> > I do not see any reason for the mutex_unlock(&inode->i_mutex); in
> > pohmelfs_rename().
> > 
> > 
> > Found by Linux Driver Verification project (linuxtesting.org).
> 
> Yes, that's a bug, we already unlocked i_mutex in common path and should
> not do that on error.
> 
> Thank you. Greg, please apply.
> 
> > Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
> 
> Acked-by: Evgeniy Polyakov <zbr@ioremap.net>

Great, I'll queue it up with the next round of patches.

greg k-h

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-01-20 16:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-19 21:13 [PATCH] pohmelfs/dir.c: Remove unneeded mutex_unlock() from pohmelfs_rename() Alexey Khoroshilov
2011-01-20 10:51 ` Evgeniy Polyakov
2011-01-20 15:52   ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox