linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1 linux-next] udf: destroy sbi mutex in put_super
@ 2015-01-10 18:13 Fabian Frederick
  2015-01-12  9:58 ` Jan Kara
  0 siblings, 1 reply; 2+ messages in thread
From: Fabian Frederick @ 2015-01-10 18:13 UTC (permalink / raw)
  To: linux-kernel; +Cc: Fabian Frederick, Jan Kara

Call mutex_destroy() on superblock mutex in udf_put_super()
otherwise mutex debugging code isn't able to detect that
mutex is used after being freed.
(thanks to Jan Kara for complete definition).

Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
 fs/udf/super.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/udf/super.c b/fs/udf/super.c
index 3ccb2f1..3d35a75 100644
--- a/fs/udf/super.c
+++ b/fs/udf/super.c
@@ -2300,6 +2300,7 @@ static void udf_put_super(struct super_block *sb)
 		udf_close_lvid(sb);
 	brelse(sbi->s_lvid_bh);
 	udf_sb_free_partitions(sb);
+	mutex_destroy(&sbi->s_alloc_mutex);
 	kfree(sb->s_fs_info);
 	sb->s_fs_info = NULL;
 }
-- 
2.1.0


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

* Re: [PATCH 1/1 linux-next] udf: destroy sbi mutex in put_super
  2015-01-10 18:13 [PATCH 1/1 linux-next] udf: destroy sbi mutex in put_super Fabian Frederick
@ 2015-01-12  9:58 ` Jan Kara
  0 siblings, 0 replies; 2+ messages in thread
From: Jan Kara @ 2015-01-12  9:58 UTC (permalink / raw)
  To: Fabian Frederick; +Cc: linux-kernel, Jan Kara

On Sat 10-01-15 19:13:32, Fabian Frederick wrote:
> Call mutex_destroy() on superblock mutex in udf_put_super()
> otherwise mutex debugging code isn't able to detect that
> mutex is used after being freed.
> (thanks to Jan Kara for complete definition).
  Applied, thanks.

							Honza

> 
> Signed-off-by: Fabian Frederick <fabf@skynet.be>
> ---
>  fs/udf/super.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/fs/udf/super.c b/fs/udf/super.c
> index 3ccb2f1..3d35a75 100644
> --- a/fs/udf/super.c
> +++ b/fs/udf/super.c
> @@ -2300,6 +2300,7 @@ static void udf_put_super(struct super_block *sb)
>  		udf_close_lvid(sb);
>  	brelse(sbi->s_lvid_bh);
>  	udf_sb_free_partitions(sb);
> +	mutex_destroy(&sbi->s_alloc_mutex);
>  	kfree(sb->s_fs_info);
>  	sb->s_fs_info = NULL;
>  }
> -- 
> 2.1.0
> 
-- 
Jan Kara <jack@suse.cz>
SUSE Labs, CR

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

end of thread, other threads:[~2015-01-12  9:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-10 18:13 [PATCH 1/1 linux-next] udf: destroy sbi mutex in put_super Fabian Frederick
2015-01-12  9:58 ` Jan Kara

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).