* [PATCH] xfs: destroy mutex qi_tree_lock before free xfs_quotainfo_t object
@ 2017-12-24 12:34 Xiongwei Song
2018-01-02 20:38 ` Darrick J. Wong
0 siblings, 1 reply; 3+ messages in thread
From: Xiongwei Song @ 2017-12-24 12:34 UTC (permalink / raw)
To: darrick.wong, linux-xfs; +Cc: linux-kernel
The mutex qi_tree_lock of xfs_quotainfo_t object was initialized when
calling xfs_qm_init_quotainfo, but it was not destroyed before free
xfs_quotainfo_t object when calling xfs_qm_destroy_quotainfo, this was
incorrect, so destroy it in function xfs_qm_destroy_quotainfo.
Signed-off-by: Xiongwei Song <sxwjean@gmail.com>
---
fs/xfs/xfs_qm.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/xfs/xfs_qm.c b/fs/xfs/xfs_qm.c
index ec952dfad359..deceef5cbbf3 100644
--- a/fs/xfs/xfs_qm.c
+++ b/fs/xfs/xfs_qm.c
@@ -737,6 +737,7 @@ xfs_qm_destroy_quotainfo(
qi->qi_pquotaip = NULL;
}
mutex_destroy(&qi->qi_quotaofflock);
+ mutex_destroy(&qi->qi_tree_lock);
kmem_free(qi);
mp->m_quotainfo = NULL;
}
--
2.15.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] xfs: destroy mutex qi_tree_lock before free xfs_quotainfo_t object
2017-12-24 12:34 [PATCH] xfs: destroy mutex qi_tree_lock before free xfs_quotainfo_t object Xiongwei Song
@ 2018-01-02 20:38 ` Darrick J. Wong
2018-01-02 22:29 ` Xiongwei Song
0 siblings, 1 reply; 3+ messages in thread
From: Darrick J. Wong @ 2018-01-02 20:38 UTC (permalink / raw)
To: Xiongwei Song; +Cc: linux-xfs, linux-kernel
On Sun, Dec 24, 2017 at 08:34:47PM +0800, Xiongwei Song wrote:
> The mutex qi_tree_lock of xfs_quotainfo_t object was initialized when
> calling xfs_qm_init_quotainfo, but it was not destroyed before free
> xfs_quotainfo_t object when calling xfs_qm_destroy_quotainfo, this was
> incorrect, so destroy it in function xfs_qm_destroy_quotainfo.
Already in for-next, but thank you for catching this.
https://git.kernel.org/pub/scm/fs/xfs/xfs-linux.git/commit/?h=for-next&id=2196881566225f3c3428d1a5f847a992944daa5b
--D
> Signed-off-by: Xiongwei Song <sxwjean@gmail.com>
> ---
> fs/xfs/xfs_qm.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/fs/xfs/xfs_qm.c b/fs/xfs/xfs_qm.c
> index ec952dfad359..deceef5cbbf3 100644
> --- a/fs/xfs/xfs_qm.c
> +++ b/fs/xfs/xfs_qm.c
> @@ -737,6 +737,7 @@ xfs_qm_destroy_quotainfo(
> qi->qi_pquotaip = NULL;
> }
> mutex_destroy(&qi->qi_quotaofflock);
> + mutex_destroy(&qi->qi_tree_lock);
> kmem_free(qi);
> mp->m_quotainfo = NULL;
> }
> --
> 2.15.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] xfs: destroy mutex qi_tree_lock before free xfs_quotainfo_t object
2018-01-02 20:38 ` Darrick J. Wong
@ 2018-01-02 22:29 ` Xiongwei Song
0 siblings, 0 replies; 3+ messages in thread
From: Xiongwei Song @ 2018-01-02 22:29 UTC (permalink / raw)
To: Darrick J. Wong; +Cc: linux-xfs, linux-kernel
2018-01-03 4:38 GMT+08:00 Darrick J. Wong <darrick.wong@oracle.com>:
> On Sun, Dec 24, 2017 at 08:34:47PM +0800, Xiongwei Song wrote:
>> The mutex qi_tree_lock of xfs_quotainfo_t object was initialized when
>> calling xfs_qm_init_quotainfo, but it was not destroyed before free
>> xfs_quotainfo_t object when calling xfs_qm_destroy_quotainfo, this was
>> incorrect, so destroy it in function xfs_qm_destroy_quotainfo.
>
> Already in for-next, but thank you for catching this.
>
> https://git.kernel.org/pub/scm/fs/xfs/xfs-linux.git/commit/?h=for-next&id=2196881566225f3c3428d1a5f847a992944daa5b
Apologies for the noise.
Yours sincerely,
Xiongwei
> --D
>
>> Signed-off-by: Xiongwei Song <sxwjean@gmail.com>
>> ---
>> fs/xfs/xfs_qm.c | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/fs/xfs/xfs_qm.c b/fs/xfs/xfs_qm.c
>> index ec952dfad359..deceef5cbbf3 100644
>> --- a/fs/xfs/xfs_qm.c
>> +++ b/fs/xfs/xfs_qm.c
>> @@ -737,6 +737,7 @@ xfs_qm_destroy_quotainfo(
>> qi->qi_pquotaip = NULL;
>> }
>> mutex_destroy(&qi->qi_quotaofflock);
>> + mutex_destroy(&qi->qi_tree_lock);
>> kmem_free(qi);
>> mp->m_quotainfo = NULL;
>> }
>> --
>> 2.15.1
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-01-02 22:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-24 12:34 [PATCH] xfs: destroy mutex qi_tree_lock before free xfs_quotainfo_t object Xiongwei Song
2018-01-02 20:38 ` Darrick J. Wong
2018-01-02 22:29 ` Xiongwei Song
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.